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 protected
RelativeLegTimingImpl(RelativeLegTimingImpl other)
Copy constructorprotected
RelativeLegTimingImpl(ServiceLegSegment parentLegSegment, LocalTime duration, LocalTime dwellTime)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
LocalTime
getDuration()
Collect durationLocalTime
getDwellTime()
Collect dwell timeServiceLegSegment
getParentLegSegment()
Collect parent leg segmentint
hashCode()
void
setDwellTime(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:
getParentLegSegment
in interfaceRelativeLegTiming
- Returns:
- parent leg segment
-
getDuration
public LocalTime getDuration()
Collect duration- Specified by:
getDuration
in interfaceRelativeLegTiming
- Returns:
- duration
-
getDwellTime
public LocalTime getDwellTime()
Collect dwell time- Specified by:
getDwellTime
in 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:
equals
in interfaceRelativeLegTiming
- Overrides:
equals
in classObject
-
-