Package org.goplanit.service.routed
Class RoutedTripsFrequencyImpl
- 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<RoutedTripFrequency>
-
- org.goplanit.service.routed.RoutedTripsFrequencyImpl
-
- All Implemented Interfaces:
Iterable<RoutedTripFrequency>,ManagedIdEntities<RoutedTripFrequency>,RoutedTrips<RoutedTripFrequency>,RoutedTripsFrequency,LongMapWrapper<RoutedTripFrequency>,MapWrapper<Long,RoutedTripFrequency>
public class RoutedTripsFrequencyImpl extends RoutedTripsImpl<RoutedTripFrequency> implements RoutedTripsFrequency
Implementation of the RoutedTripsFrequency 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 RoutedTripsFrequencyImpl(RoutedTripsFrequencyImpl other, boolean deepCopy, BiConsumer<RoutedTripFrequency,RoutedTripFrequency> mapper)Copy constructor, also creates new factory with this as its underlying containerprotectedRoutedTripsFrequencyImpl(IdGroupingToken tokenId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedTripsFrequencyImpldeepClone()Deep clone implementationRoutedTripsFrequencyImpldeepCloneWithMapping(BiConsumer<RoutedTripFrequency,RoutedTripFrequency> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperRoutedTripFrequencyFactoryImplgetFactory()Factory to create instance of managed id entity (for this container class)RoutedTripsFrequencyImplshallowClone()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
-
-
-
-
Constructor Detail
-
RoutedTripsFrequencyImpl
protected RoutedTripsFrequencyImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId- to use
-
RoutedTripsFrequencyImpl
public RoutedTripsFrequencyImpl(RoutedTripsFrequencyImpl other, boolean deepCopy, BiConsumer<RoutedTripFrequency,RoutedTripFrequency> 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 RoutedTripsFrequencyImpl 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<RoutedTripFrequency>- Specified by:
shallowClonein interfaceMapWrapper<Long,RoutedTripFrequency>- Specified by:
shallowClonein interfaceRoutedTrips<RoutedTripFrequency>- Specified by:
shallowClonein interfaceRoutedTripsFrequency- Specified by:
shallowClonein classRoutedTripsImpl<RoutedTripFrequency>- Returns:
- copy
-
deepClone
public RoutedTripsFrequencyImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceManagedIdEntities<RoutedTripFrequency>- Specified by:
deepClonein interfaceRoutedTrips<RoutedTripFrequency>- Specified by:
deepClonein interfaceRoutedTripsFrequency- Specified by:
deepClonein classRoutedTripsImpl<RoutedTripFrequency>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public RoutedTripsFrequencyImpl deepCloneWithMapping(BiConsumer<RoutedTripFrequency,RoutedTripFrequency> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<RoutedTripFrequency>- Specified by:
deepCloneWithMappingin interfaceRoutedTrips<RoutedTripFrequency>- Specified by:
deepCloneWithMappingin interfaceRoutedTripsFrequency- Specified by:
deepCloneWithMappingin classRoutedTripsImpl<RoutedTripFrequency>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
getFactory
public RoutedTripFrequencyFactoryImpl getFactory()
Factory to create instance of managed id entity (for this container class)- Specified by:
getFactoryin interfaceManagedIdEntities<RoutedTripFrequency>- Specified by:
getFactoryin interfaceRoutedTrips<RoutedTripFrequency>- Specified by:
getFactoryin interfaceRoutedTripsFrequency- Overrides:
getFactoryin classRoutedTripsImpl<RoutedTripFrequency>- Returns:
- entity factory
-
-