Package org.goplanit.service.routed
Class RelativeLegTimingImpl
- java.lang.Object
-
- org.goplanit.service.routed.RelativeLegTimingImpl
-
- All Implemented Interfaces:
Cloneable,RelativeLegTiming
public class RelativeLegTimingImpl extends Object implements RelativeLegTiming
Simple POJO class that refers to a service leg and its duration and dwell time on a scheduled routed trip- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRelativeLegTimingImpl(RelativeLegTimingImpl other)Copy constructorprotectedRelativeLegTimingImpl(ServiceLegSegment parentLegSegment, LocalTime duration, LocalTime dwellTime)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)LocalTimegetDuration()Collect durationLocalTimegetDwellTime()Collect dwell timeServiceLegSegmentgetParentLegSegment()Collect parent leg segmentinthashCode()voidsetDwellTime(LocalTime dwellTime)Replace the dwell time with a new dwell time-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.service.routed.RelativeLegTiming
hasParentLegSegment
-
-
-
-
Constructor Detail
-
RelativeLegTimingImpl
protected RelativeLegTimingImpl(ServiceLegSegment parentLegSegment, LocalTime duration, LocalTime dwellTime)
Constructor- Parameters:
parentLegSegment- to useduration- to usedwellTime- to use
-
RelativeLegTimingImpl
protected RelativeLegTimingImpl(RelativeLegTimingImpl other)
Copy constructor- Parameters:
other- to copy
-
-
Method Detail
-
getParentLegSegment
public ServiceLegSegment getParentLegSegment()
Collect parent leg segment- Specified by:
getParentLegSegmentin interfaceRelativeLegTiming- Returns:
- parent leg segment
-
getDuration
public LocalTime getDuration()
Collect duration- Specified by:
getDurationin interfaceRelativeLegTiming- Returns:
- duration
-
getDwellTime
public LocalTime getDwellTime()
Collect dwell time- Specified by:
getDwellTimein interfaceRelativeLegTiming- Returns:
- dwell time
-
setDwellTime
public void setDwellTime(LocalTime dwellTime)
Replace the dwell time with a new dwell time- Parameters:
dwellTime- to set
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceRelativeLegTiming- Overrides:
equalsin classObject
-
-