Class ServiceLegsImpl
- 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<ServiceLeg>
-
- org.goplanit.network.layer.service.ServiceLegsImpl
-
- All Implemented Interfaces:
Cloneable,Iterable<ServiceLeg>,GraphEntities<ServiceLeg>,ManagedGraphEntities<ServiceLeg>,ManagedIdEntities<ServiceLeg>,ServiceLegs,LongMapWrapper<ServiceLeg>,MapWrapper<Long,ServiceLeg>
public class ServiceLegsImpl extends ManagedGraphEntitiesImpl<ServiceLeg> implements ServiceLegs
Container class for managing service legs within a service network- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description ServiceLegsImpl(ServiceLegsImpl other, boolean deepCopy, BiConsumer<ServiceLeg,ServiceLeg> mapper)Copy constructor, also creates new factory with this as its underlying containerServiceLegsImpl(IdGroupingToken groupId)ConstructorServiceLegsImpl(IdGroupingToken groupId, ServiceLegFactory serviceLegFactory)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceLegsImpldeepClone()Deep clone implementationServiceLegsImpldeepCloneWithMapping(BiConsumer<ServiceLeg,ServiceLeg> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperServiceLegFactorygetFactory()Factory to create instance of graph entity (for this container class)ServiceLegsImplshallowClone()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.ServiceLegs
hasServiceLeg
-
-
-
-
Constructor Detail
-
ServiceLegsImpl
public ServiceLegsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- to use for creating ids for instances
-
ServiceLegsImpl
public ServiceLegsImpl(IdGroupingToken groupId, ServiceLegFactory serviceLegFactory)
Constructor- Parameters:
groupId- to use for creating ids for instancesserviceLegFactory- the factory to use
-
ServiceLegsImpl
public ServiceLegsImpl(ServiceLegsImpl other, boolean deepCopy, BiConsumer<ServiceLeg,ServiceLeg> 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 ServiceLegFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactoryin interfaceGraphEntities<ServiceLeg>- Specified by:
getFactoryin interfaceManagedIdEntities<ServiceLeg>- Specified by:
getFactoryin interfaceServiceLegs- Returns:
- entity factory
-
shallowClone
public ServiceLegsImpl 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<ServiceLeg>- Specified by:
shallowClonein interfaceManagedGraphEntities<ServiceLeg>- Specified by:
shallowClonein interfaceManagedIdEntities<ServiceLeg>- Specified by:
shallowClonein interfaceMapWrapper<Long,ServiceLeg>- Specified by:
shallowClonein interfaceServiceLegs- Specified by:
shallowClonein classManagedGraphEntitiesImpl<ServiceLeg>- Returns:
- copy
-
deepClone
public ServiceLegsImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceGraphEntities<ServiceLeg>- Specified by:
deepClonein interfaceManagedGraphEntities<ServiceLeg>- Specified by:
deepClonein interfaceManagedIdEntities<ServiceLeg>- Specified by:
deepClonein interfaceServiceLegs- Specified by:
deepClonein classManagedGraphEntitiesImpl<ServiceLeg>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public ServiceLegsImpl deepCloneWithMapping(BiConsumer<ServiceLeg,ServiceLeg> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceGraphEntities<ServiceLeg>- Specified by:
deepCloneWithMappingin interfaceManagedGraphEntities<ServiceLeg>- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<ServiceLeg>- Specified by:
deepCloneWithMappingin interfaceServiceLegs- Specified by:
deepCloneWithMappingin classManagedGraphEntitiesImpl<ServiceLeg>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
-