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 RoutedServiceTripInfoImpl
clone()
Be able to clone a RoutedServicetripInfo instanceRoutedTripsFrequency
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 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:
clone
in interfaceRoutedServiceTripInfo
- Overrides:
clone
in 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:
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
-
-