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 containerprotected
RoutedTripsScheduleImpl(IdGroupingToken tokenId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedTripsScheduleImpl
deepClone()
Deep clone implementationRoutedTripsScheduleImpl
deepCloneWithMapping(BiConsumer<RoutedTripSchedule,RoutedTripSchedule> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapperRoutedTripScheduleFactoryImpl
getFactory()
Factory to create instance of managed id entity (for this container class)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-
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:
shallowClone
in interfaceManagedIdEntities<RoutedTripSchedule>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,RoutedTripSchedule>
- Specified by:
shallowClone
in interfaceRoutedTrips<RoutedTripSchedule>
- Specified by:
shallowClone
in interfaceRoutedTripsSchedule
- Specified by:
shallowClone
in classRoutedTripsImpl<RoutedTripSchedule>
- Returns:
- copy
-
deepClone
public RoutedTripsScheduleImpl deepClone()
Deep clone implementation- Specified by:
deepClone
in interfaceManagedIdEntities<RoutedTripSchedule>
- Specified by:
deepClone
in interfaceRoutedTrips<RoutedTripSchedule>
- Specified by:
deepClone
in interfaceRoutedTripsSchedule
- Specified by:
deepClone
in 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:
deepCloneWithMapping
in interfaceManagedIdEntities<RoutedTripSchedule>
- Specified by:
deepCloneWithMapping
in interfaceRoutedTrips<RoutedTripSchedule>
- Specified by:
deepCloneWithMapping
in interfaceRoutedTripsSchedule
- Specified by:
deepCloneWithMapping
in 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:
getFactory
in interfaceManagedIdEntities<RoutedTripSchedule>
- Specified by:
getFactory
in interfaceRoutedTrips<RoutedTripSchedule>
- Specified by:
getFactory
in interfaceRoutedTripsSchedule
- Overrides:
getFactory
in classRoutedTripsImpl<RoutedTripSchedule>
- Returns:
- entity factory
-
-