Package org.goplanit.service.routed
Class RoutedTripsScheduleImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<T>
-
- org.goplanit.service.routed.RoutedTripsImpl<RoutedTripSchedule>
-
- org.goplanit.service.routed.RoutedTripsScheduleImpl
-
- All Implemented Interfaces:
Iterable<RoutedTripSchedule>,ManagedIdEntities<RoutedTripSchedule>,RoutedTrips<RoutedTripSchedule>,RoutedTripsSchedule,LongMapWrapper<RoutedTripSchedule>,MapWrapper<Long,RoutedTripSchedule>
public class RoutedTripsScheduleImpl extends RoutedTripsImpl<RoutedTripSchedule> implements RoutedTripsSchedule
Implementation of the RoutedTripsSchedule interface.- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.service.routed.RoutedTripsImpl
factory
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Modifier Constructor Description RoutedTripsScheduleImpl(RoutedTripsScheduleImpl other, boolean deepCopy, BiConsumer<RoutedTripSchedule,RoutedTripSchedule> mapper)Copy constructor, also creates new factory with this as its underlying containerprotectedRoutedTripsScheduleImpl(IdGroupingToken tokenId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedTripsScheduleImpldeepClone()Deep clone implementationRoutedTripsScheduleImpldeepCloneWithMapping(BiConsumer<RoutedTripSchedule,RoutedTripSchedule> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperRoutedTripScheduleFactoryImplgetFactory()Factory to create instance of managed id entity (for this container class)RoutedTripsScheduleImplshallowClone()Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly created-
Methods inherited from class org.goplanit.service.routed.RoutedTripsImpl
setFactory
-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
getManagedIdClass, recreateIds, reset, updateIdMapping
-
Methods inherited from class org.goplanit.utils.wrapper.LongMapWrapperImpl
containsKey, get, remove
-
Methods inherited from class org.goplanit.utils.wrapper.MapWrapperImpl
clear, containsValue, createEmptyInstance, firstMatch, get, getKeyByValue, getMap, getValueToKey, isEmpty, iterator, register, remove, removeIf, setMap, size, toCollection, valuesAsNewSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.wrapper.LongMapWrapper
get, remove
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntities
containsKey, getManagedIdClass, groupBy, recreateIds, recreateIds, reset, streamSortedBy
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, clear, containsValue, firstMatch, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, removeAll, removeIf, size, stream, streamSorted, toCollection, toMap, valuesAsNewSet
-
Methods inherited from interface org.goplanit.utils.service.routed.RoutedTrips
determineUsedServiceNodes
-
Methods inherited from interface org.goplanit.utils.service.routed.RoutedTripsSchedule
groupByPhysicalLinkSegments, groupByRelativeLegTimings, groupByServiceLegSegments
-
-
-
-
Constructor Detail
-
RoutedTripsScheduleImpl
protected RoutedTripsScheduleImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId- to use
-
RoutedTripsScheduleImpl
public RoutedTripsScheduleImpl(RoutedTripsScheduleImpl other, boolean deepCopy, BiConsumer<RoutedTripSchedule,RoutedTripSchedule> mapper)
Copy constructor, also creates new factory with this as its underlying container- Parameters:
other- to copydeepCopy- when true, create a deep copy, shallow copy otherwisemapper- to use for tracking mapping between original and copied entity (may be null)
-
-
Method Detail
-
shallowClone
public RoutedTripsScheduleImpl shallowClone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly created- Specified by:
shallowClonein interfaceManagedIdEntities<RoutedTripSchedule>- Specified by:
shallowClonein interfaceMapWrapper<Long,RoutedTripSchedule>- Specified by:
shallowClonein interfaceRoutedTrips<RoutedTripSchedule>- Specified by:
shallowClonein interfaceRoutedTripsSchedule- Specified by:
shallowClonein classRoutedTripsImpl<RoutedTripSchedule>- Returns:
- copy
-
deepClone
public RoutedTripsScheduleImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceManagedIdEntities<RoutedTripSchedule>- Specified by:
deepClonein interfaceRoutedTrips<RoutedTripSchedule>- Specified by:
deepClonein interfaceRoutedTripsSchedule- Specified by:
deepClonein classRoutedTripsImpl<RoutedTripSchedule>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public RoutedTripsScheduleImpl deepCloneWithMapping(BiConsumer<RoutedTripSchedule,RoutedTripSchedule> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<RoutedTripSchedule>- Specified by:
deepCloneWithMappingin interfaceRoutedTrips<RoutedTripSchedule>- Specified by:
deepCloneWithMappingin interfaceRoutedTripsSchedule- Specified by:
deepCloneWithMappingin classRoutedTripsImpl<RoutedTripSchedule>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
getFactory
public RoutedTripScheduleFactoryImpl getFactory()
Factory to create instance of managed id entity (for this container class)- Specified by:
getFactoryin interfaceManagedIdEntities<RoutedTripSchedule>- Specified by:
getFactoryin interfaceRoutedTrips<RoutedTripSchedule>- Specified by:
getFactoryin interfaceRoutedTripsSchedule- Overrides:
getFactoryin classRoutedTripsImpl<RoutedTripSchedule>- Returns:
- entity factory
-
-