Package org.goplanit.service.routed
Class RoutedServiceTripInfoImpl
- java.lang.Object
-
- org.goplanit.service.routed.RoutedServiceTripInfoImpl
-
- All Implemented Interfaces:
Cloneable,RoutedServiceTripInfo
public class RoutedServiceTripInfoImpl extends Object implements RoutedServiceTripInfo
Implementation of a RoutedServiceTripInfo interface- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description RoutedServiceTripInfoImpl(RoutedServiceTripInfoImpl routedServiceTripInfoImpl)Copy constructorRoutedServiceTripInfoImpl(IdGroupingToken tokenId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedServiceTripInfoImplclone()Be able to clone a RoutedServicetripInfo instanceRoutedTripsFrequencygetFrequencyBasedTrips()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 trips-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.service.routed.RoutedServiceTripInfo
hasFrequencyBasedTrips, hasScheduleBasedTrips
-
-
-
-
Constructor Detail
-
RoutedServiceTripInfoImpl
public RoutedServiceTripInfoImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId- to use for id generation
-
RoutedServiceTripInfoImpl
public RoutedServiceTripInfoImpl(RoutedServiceTripInfoImpl routedServiceTripInfoImpl)
Copy constructor- Parameters:
routedServiceTripInfoImpl- to copy
-
-
Method Detail
-
clone
public RoutedServiceTripInfoImpl clone()
Be able to clone a RoutedServicetripInfo instance- Specified by:
clonein interfaceRoutedServiceTripInfo- Overrides:
clonein classObject- Returns:
- shallow copy
-
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
-
-