Package org.goplanit.service.routed
Class RoutedTripsImpl<T extends RoutedTrip>
- 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<T>
 
 
 
 
- 
- All Implemented Interfaces:
- Iterable<T>,- ManagedIdEntities<T>,- RoutedTrips<T>,- LongMapWrapper<T>,- MapWrapper<Long,T>
 - Direct Known Subclasses:
- RoutedTripsFrequencyImpl,- RoutedTripsScheduleImpl
 
 public abstract class RoutedTripsImpl<T extends RoutedTrip> extends ManagedIdEntitiesImpl<T> implements RoutedTrips<T> Base class for toued trips of some derived type (either schedule or frequency based for example).- Author:
- markr
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected RoutedTripFactoryImpl<T>factoryfactory for this container class- 
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImplmanagedIdClass
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedRoutedTripsImpl(RoutedTripsImpl<T> routedTripsBase, boolean deepCopy, BiConsumer<T,T> mapper)Copy constructor, incomplete, requires derived class to explicitly set factoryprotectedRoutedTripsImpl(IdGroupingToken tokenId)Constructor
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract RoutedTripsImpldeepClone()Deep clone implementationabstract RoutedTripsImpldeepCloneWithMapping(BiConsumer<T,T> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperRoutedTripFactoryImpl<T>getFactory()Factory to create instance of managed id entity (for this container class)protected voidsetFactory(RoutedTripFactoryImpl<T> factory)The factory to use.abstract RoutedTripsImplshallowClone()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.utils.id.ManagedIdEntitiesImplgetManagedIdClass, recreateIds, reset, updateIdMapping
 - 
Methods inherited from class org.goplanit.utils.wrapper.LongMapWrapperImplcontainsKey, get, remove
 - 
Methods inherited from class org.goplanit.utils.wrapper.MapWrapperImplclear, containsValue, createEmptyInstance, firstMatch, get, getKeyByValue, getMap, getValueToKey, isEmpty, iterator, register, remove, removeIf, setMap, size, toCollection, valuesAsNewSet
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, iterator, spliterator
 - 
Methods inherited from interface org.goplanit.utils.wrapper.LongMapWrapperget, remove
 - 
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntitiescontainsKey, getManagedIdClass, groupBy, recreateIds, recreateIds, reset, streamSortedBy
 - 
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapperaddAll, 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.RoutedTripsdetermineUsedServiceNodes
 
- 
 
- 
- 
- 
Field Detail- 
factoryprotected RoutedTripFactoryImpl<T extends RoutedTrip> factory factory for this container class
 
- 
 - 
Constructor Detail- 
RoutedTripsImplprotected RoutedTripsImpl(IdGroupingToken tokenId) Constructor- Parameters:
- tokenId- to use
 
 - 
RoutedTripsImplprotected RoutedTripsImpl(RoutedTripsImpl<T> routedTripsBase, boolean deepCopy, BiConsumer<T,T> mapper) Copy constructor, incomplete, requires derived class to explicitly set factory- Parameters:
- routedTripsBase- to copy
- deepCopy- when true, create a deep copy, shallow copy otherwise
- mapper- to use for tracking mapping between original and copied entity (may be null)
 
 
- 
 - 
Method Detail- 
setFactoryprotected void setFactory(RoutedTripFactoryImpl<T> factory) The factory to use. To be set once by super class immediately after construction of the instance- Parameters:
- factory- to use
 
 - 
getFactorypublic RoutedTripFactoryImpl<T> getFactory() Factory to create instance of managed id entity (for this container class)- Specified by:
- getFactoryin interface- ManagedIdEntities<T extends RoutedTrip>
- Specified by:
- getFactoryin interface- RoutedTrips<T extends RoutedTrip>
- Returns:
- entity factory
 
 - 
shallowClonepublic abstract RoutedTripsImpl 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 interface- ManagedIdEntities<T extends RoutedTrip>
- Specified by:
- shallowClonein interface- MapWrapper<Long,T extends RoutedTrip>
- Specified by:
- shallowClonein interface- RoutedTrips<T extends RoutedTrip>
- Specified by:
- shallowClonein class- ManagedIdEntitiesImpl<T extends RoutedTrip>
- Returns:
- copy
 
 - 
deepClonepublic abstract RoutedTripsImpl deepClone() Deep clone implementation- Specified by:
- deepClonein interface- ManagedIdEntities<T extends RoutedTrip>
- Specified by:
- deepClonein interface- RoutedTrips<T extends RoutedTrip>
- Specified by:
- deepClonein class- ManagedIdEntitiesImpl<T extends RoutedTrip>
- Returns:
- deep copy of entities
 
 - 
deepCloneWithMappingpublic abstract RoutedTripsImpl deepCloneWithMapping(BiConsumer<T,T> mapper) Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
- deepCloneWithMappingin interface- ManagedIdEntities<T extends RoutedTrip>
- Specified by:
- deepCloneWithMappingin interface- RoutedTrips<T extends RoutedTrip>
- Specified by:
- deepCloneWithMappingin class- ManagedIdEntitiesImpl<T extends RoutedTrip>
- Parameters:
- mapper- to apply to each mapping between original and copy
- Returns:
- copy
 
 
- 
 
-