Class MacroscopicLinkSegmentsImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<E>
-
- org.goplanit.utils.graph.ManagedGraphEntitiesImpl<MacroscopicLinkSegment>
-
- org.goplanit.network.layer.macroscopic.MacroscopicLinkSegmentsImpl
-
- All Implemented Interfaces:
Cloneable,Iterable<MacroscopicLinkSegment>,GraphEntities<MacroscopicLinkSegment>,ManagedGraphEntities<MacroscopicLinkSegment>,ManagedIdEntities<MacroscopicLinkSegment>,MacroscopicLinkSegments,LongMapWrapper<MacroscopicLinkSegment>,MapWrapper<Long,MacroscopicLinkSegment>
public class MacroscopicLinkSegmentsImpl extends ManagedGraphEntitiesImpl<MacroscopicLinkSegment> implements MacroscopicLinkSegments
Link segments container implementation- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description MacroscopicLinkSegmentsImpl(MacroscopicLinkSegmentsImpl other, boolean deepCopy, BiConsumer<MacroscopicLinkSegment,MacroscopicLinkSegment> mapper)Copy constructor, also creates new factory with this as its underlying containerMacroscopicLinkSegmentsImpl(IdGroupingToken groupId)ConstructorMacroscopicLinkSegmentsImpl(IdGroupingToken groupId, MacroscopicLinkSegmentFactory linkSegmentFactory)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicLinkSegmentsImpldeepClone()Deep clone implementationMacroscopicLinkSegmentsImpldeepCloneWithMapping(BiConsumer<MacroscopicLinkSegment,MacroscopicLinkSegment> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperMacroscopicLinkSegmentFactorygetFactory()Factory to create instance of graph entity (for this container class)MacroscopicLinkSegmentsImplshallowClone()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.graph.ManagedGraphEntitiesImpl
getByXmlId
-
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 org.goplanit.utils.graph.GraphEntities
forEachMatchingIdIn, getByExternalId, getByXmlId
-
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.network.layer.macroscopic.MacroscopicLinkSegments
getFreeFlowTravelTimeHourPerLinkSegment
-
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
-
-
-
-
Constructor Detail
-
MacroscopicLinkSegmentsImpl
public MacroscopicLinkSegmentsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- to use for creating ids for instances
-
MacroscopicLinkSegmentsImpl
public MacroscopicLinkSegmentsImpl(IdGroupingToken groupId, MacroscopicLinkSegmentFactory linkSegmentFactory)
Constructor- Parameters:
groupId- to use for creating ids for instanceslinkSegmentFactory- the factory to use
-
MacroscopicLinkSegmentsImpl
public MacroscopicLinkSegmentsImpl(MacroscopicLinkSegmentsImpl other, boolean deepCopy, BiConsumer<MacroscopicLinkSegment,MacroscopicLinkSegment> mapper)
Copy constructor, also creates new factory with this as its underlying container- Parameters:
other- to copydeepCopy- when true, create a deep cpy, shallow copy otherwisemapper- to apply in case of deep copy to each original to copy combination (when provided, may be null)
-
-
Method Detail
-
getFactory
public MacroscopicLinkSegmentFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactoryin interfaceGraphEntities<MacroscopicLinkSegment>- Specified by:
getFactoryin interfaceMacroscopicLinkSegments- Specified by:
getFactoryin interfaceManagedIdEntities<MacroscopicLinkSegment>- Returns:
- entity factory
-
shallowClone
public MacroscopicLinkSegmentsImpl 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 interfaceGraphEntities<MacroscopicLinkSegment>- Specified by:
shallowClonein interfaceMacroscopicLinkSegments- Specified by:
shallowClonein interfaceManagedGraphEntities<MacroscopicLinkSegment>- Specified by:
shallowClonein interfaceManagedIdEntities<MacroscopicLinkSegment>- Specified by:
shallowClonein interfaceMapWrapper<Long,MacroscopicLinkSegment>- Specified by:
shallowClonein classManagedGraphEntitiesImpl<MacroscopicLinkSegment>- Returns:
- copy
-
deepClone
public MacroscopicLinkSegmentsImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceGraphEntities<MacroscopicLinkSegment>- Specified by:
deepClonein interfaceMacroscopicLinkSegments- Specified by:
deepClonein interfaceManagedGraphEntities<MacroscopicLinkSegment>- Specified by:
deepClonein interfaceManagedIdEntities<MacroscopicLinkSegment>- Specified by:
deepClonein classManagedGraphEntitiesImpl<MacroscopicLinkSegment>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public MacroscopicLinkSegmentsImpl deepCloneWithMapping(BiConsumer<MacroscopicLinkSegment,MacroscopicLinkSegment> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceGraphEntities<MacroscopicLinkSegment>- Specified by:
deepCloneWithMappingin interfaceMacroscopicLinkSegments- Specified by:
deepCloneWithMappingin interfaceManagedGraphEntities<MacroscopicLinkSegment>- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<MacroscopicLinkSegment>- Specified by:
deepCloneWithMappingin classManagedGraphEntitiesImpl<MacroscopicLinkSegment>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
-