Package org.goplanit.service.routed
Class RoutedServiceTripInfoImpl
- java.lang.Object
-
- org.goplanit.service.routed.RoutedServiceTripInfoImpl
-
- All Implemented Interfaces:
RoutedServiceTripInfo
public class RoutedServiceTripInfoImpl extends Object implements RoutedServiceTripInfo
Implementation of a RoutedServiceTripInfo interface- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description RoutedServiceTripInfoImpl(RoutedServiceTripInfoImpl other, boolean deepCopy)Copy constructorRoutedServiceTripInfoImpl(IdGroupingToken tokenId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedServiceTripInfoImpldeepClone()RoutedTripsFrequencygetFrequencyBasedTrips()Trips for a service can be frequency or schedule based, or have both.RoutedTripsSchedulegetScheduleBasedTrips()Trips for a service can be frequency or schedule based, or have both.voidreset()Remove all registered frequency and schedule based tripsRoutedServiceTripInfoImplshallowClone()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.service.routed.RoutedServiceTripInfo
getLegSegmentsStream, hasAnyTrips, hasFrequencyBasedTrips, hasScheduleBasedTrips
-
-
-
-
Constructor Detail
-
RoutedServiceTripInfoImpl
public RoutedServiceTripInfoImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId- to use for id generation
-
RoutedServiceTripInfoImpl
public RoutedServiceTripInfoImpl(RoutedServiceTripInfoImpl other, boolean deepCopy)
Copy constructor- Parameters:
other- to copydeepCopy- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
shallowClone
public RoutedServiceTripInfoImpl shallowClone()
- Specified by:
shallowClonein interfaceRoutedServiceTripInfo
-
deepClone
public RoutedServiceTripInfoImpl deepClone()
- Specified by:
deepClonein interfaceRoutedServiceTripInfo
-
getFrequencyBasedTrips
public RoutedTripsFrequency getFrequencyBasedTrips()
Trips for a service can be frequency or schedule based, or have both. Via this method we collect only the frequency based trips- Specified by:
getFrequencyBasedTripsin interfaceRoutedServiceTripInfo- Returns:
- frequency based trips of the service
-
getScheduleBasedTrips
public RoutedTripsSchedule getScheduleBasedTrips()
Trips for a service can be frequency or schedule based, or have both. Via this method we collect only the schedule based trips- Specified by:
getScheduleBasedTripsin interfaceRoutedServiceTripInfo- Returns:
- schedule based trips of the service
-
reset
public void reset()
Remove all registered frequency and schedule based trips- Specified by:
resetin interfaceRoutedServiceTripInfo
-
-