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