Class ServiceLegSegmentsImpl
- 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<ServiceLegSegment>
-
- org.goplanit.network.layer.service.ServiceLegSegmentsImpl
-
- All Implemented Interfaces:
Cloneable,Iterable<ServiceLegSegment>,GraphEntities<ServiceLegSegment>,ManagedGraphEntities<ServiceLegSegment>,ManagedIdEntities<ServiceLegSegment>,ServiceLegSegments,LongMapWrapper<ServiceLegSegment>,MapWrapper<Long,ServiceLegSegment>
public class ServiceLegSegmentsImpl extends ManagedGraphEntitiesImpl<ServiceLegSegment> implements ServiceLegSegments
Implementation of ServiceLegSegments container.- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description ServiceLegSegmentsImpl(ServiceLegSegmentsImpl other, boolean deepCopy, BiConsumer<ServiceLegSegment,ServiceLegSegment> mapper)Copy constructor, also creates new factory with this as its underlying containerServiceLegSegmentsImpl(IdGroupingToken groupId)ConstructorServiceLegSegmentsImpl(IdGroupingToken groupId, ServiceLegSegmentFactory serviceLegSegmentFactory)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceLegSegmentsImpldeepClone()Deep clone implementationServiceLegSegmentsImpldeepCloneWithMapping(BiConsumer<ServiceLegSegment,ServiceLegSegment> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperServiceLegSegmentFactorygetFactory()Factory to create instance of graph entity (for this container class)ServiceLegSegmentsImplshallowClone()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.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.network.layer.service.ServiceLegSegments
hasServiceLegSegment, hasServiceLegSegment
-
-
-
-
Constructor Detail
-
ServiceLegSegmentsImpl
public ServiceLegSegmentsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- to use for creating ids for instances
-
ServiceLegSegmentsImpl
public ServiceLegSegmentsImpl(IdGroupingToken groupId, ServiceLegSegmentFactory serviceLegSegmentFactory)
Constructor- Parameters:
groupId- to use for creating ids for instancesserviceLegSegmentFactory- the factory to use
-
ServiceLegSegmentsImpl
public ServiceLegSegmentsImpl(ServiceLegSegmentsImpl other, boolean deepCopy, BiConsumer<ServiceLegSegment,ServiceLegSegment> 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- apply to each mapping from original to copy
-
-
Method Detail
-
getFactory
public ServiceLegSegmentFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactoryin interfaceGraphEntities<ServiceLegSegment>- Specified by:
getFactoryin interfaceManagedIdEntities<ServiceLegSegment>- Specified by:
getFactoryin interfaceServiceLegSegments- Returns:
- entity factory
-
shallowClone
public ServiceLegSegmentsImpl 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<ServiceLegSegment>- Specified by:
shallowClonein interfaceManagedGraphEntities<ServiceLegSegment>- Specified by:
shallowClonein interfaceManagedIdEntities<ServiceLegSegment>- Specified by:
shallowClonein interfaceMapWrapper<Long,ServiceLegSegment>- Specified by:
shallowClonein interfaceServiceLegSegments- Specified by:
shallowClonein classManagedGraphEntitiesImpl<ServiceLegSegment>- Returns:
- copy
-
deepClone
public ServiceLegSegmentsImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceGraphEntities<ServiceLegSegment>- Specified by:
deepClonein interfaceManagedGraphEntities<ServiceLegSegment>- Specified by:
deepClonein interfaceManagedIdEntities<ServiceLegSegment>- Specified by:
deepClonein interfaceServiceLegSegments- Specified by:
deepClonein classManagedGraphEntitiesImpl<ServiceLegSegment>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public ServiceLegSegmentsImpl deepCloneWithMapping(BiConsumer<ServiceLegSegment,ServiceLegSegment> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceGraphEntities<ServiceLegSegment>- Specified by:
deepCloneWithMappingin interfaceManagedGraphEntities<ServiceLegSegment>- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<ServiceLegSegment>- Specified by:
deepCloneWithMappingin interfaceServiceLegSegments- Specified by:
deepCloneWithMappingin classManagedGraphEntitiesImpl<ServiceLegSegment>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
-