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 RoutedServiceTripInfoImpl
deepClone()
RoutedTripsFrequency
getFrequencyBasedTrips()
Trips for a service can be frequency or schedule based, or have both.RoutedTripsSchedule
getScheduleBasedTrips()
Trips for a service can be frequency or schedule based, or have both.void
reset()
Remove all registered frequency and schedule based tripsRoutedServiceTripInfoImpl
shallowClone()
-
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:
shallowClone
in interfaceRoutedServiceTripInfo
-
deepClone
public RoutedServiceTripInfoImpl deepClone()
- Specified by:
deepClone
in 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:
getFrequencyBasedTrips
in 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:
getScheduleBasedTrips
in interfaceRoutedServiceTripInfo
- Returns:
- schedule based trips of the service
-
reset
public void reset()
Remove all registered frequency and schedule based trips- Specified by:
reset
in interfaceRoutedServiceTripInfo
-
-