Package org.goplanit.network.virtual
Class ConjugateConnectoidNodesImpl
- 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<ConjugateConnectoidNode>
-
- org.goplanit.network.virtual.ConjugateConnectoidNodesImpl
-
- All Implemented Interfaces:
Cloneable,Iterable<ConjugateConnectoidNode>,GraphEntities<ConjugateConnectoidNode>,ManagedGraphEntities<ConjugateConnectoidNode>,ManagedIdEntities<ConjugateConnectoidNode>,ConjugateConnectoidNodes,LongMapWrapper<ConjugateConnectoidNode>,MapWrapper<Long,ConjugateConnectoidNode>
public class ConjugateConnectoidNodesImpl extends ManagedGraphEntitiesImpl<ConjugateConnectoidNode> implements ConjugateConnectoidNodes
Conjugate connectoid nodes managed container implementation. Note that each conjugate connectoid node will be indexed by its original link's id to allow for easy matching. In turn it is expected that the conjugate node's id is also synced to the original link's id anyway. However we explicit map to the original link's id as this ensures that when recreating managed ids the correct id is used- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description ConjugateConnectoidNodesImpl(ConjugateConnectoidNodesImpl other, boolean deepCopy, BiConsumer<ConjugateConnectoidNode,ConjugateConnectoidNode> mapper)Copy constructor, also creates new factory with this as its underlying containerConjugateConnectoidNodesImpl(IdGroupingToken groupId)ConstructorConjugateConnectoidNodesImpl(IdGroupingToken groupId, ConjugateConnectoidNodeFactory conjugateConnectoidNodeFactory)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateConnectoidNodesImpldeepClone()Deep clone implementationConjugateConnectoidNodesImpldeepCloneWithMapping(BiConsumer<ConjugateConnectoidNode,ConjugateConnectoidNode> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperConjugateConnectoidNodeFactorygetFactory()Factory to create instance of graph entity (for this container class)ConjugateConnectoidNodesImplshallowClone()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
-
-
-
-
Constructor Detail
-
ConjugateConnectoidNodesImpl
public ConjugateConnectoidNodesImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- to use for creating ids for instances
-
ConjugateConnectoidNodesImpl
public ConjugateConnectoidNodesImpl(IdGroupingToken groupId, ConjugateConnectoidNodeFactory conjugateConnectoidNodeFactory)
Constructor- Parameters:
groupId- to use for creating ids for instancesconjugateConnectoidNodeFactory- the factory to use
-
ConjugateConnectoidNodesImpl
public ConjugateConnectoidNodesImpl(ConjugateConnectoidNodesImpl other, boolean deepCopy, BiConsumer<ConjugateConnectoidNode,ConjugateConnectoidNode> 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 ConjugateConnectoidNodeFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactoryin interfaceConjugateConnectoidNodes- Specified by:
getFactoryin interfaceGraphEntities<ConjugateConnectoidNode>- Specified by:
getFactoryin interfaceManagedIdEntities<ConjugateConnectoidNode>- Returns:
- entity factory
-
shallowClone
public ConjugateConnectoidNodesImpl 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 interfaceConjugateConnectoidNodes- Specified by:
shallowClonein interfaceGraphEntities<ConjugateConnectoidNode>- Specified by:
shallowClonein interfaceManagedGraphEntities<ConjugateConnectoidNode>- Specified by:
shallowClonein interfaceManagedIdEntities<ConjugateConnectoidNode>- Specified by:
shallowClonein interfaceMapWrapper<Long,ConjugateConnectoidNode>- Specified by:
shallowClonein classManagedGraphEntitiesImpl<ConjugateConnectoidNode>- Returns:
- copy
-
deepClone
public ConjugateConnectoidNodesImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceConjugateConnectoidNodes- Specified by:
deepClonein interfaceGraphEntities<ConjugateConnectoidNode>- Specified by:
deepClonein interfaceManagedGraphEntities<ConjugateConnectoidNode>- Specified by:
deepClonein interfaceManagedIdEntities<ConjugateConnectoidNode>- Specified by:
deepClonein classManagedGraphEntitiesImpl<ConjugateConnectoidNode>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public ConjugateConnectoidNodesImpl deepCloneWithMapping(BiConsumer<ConjugateConnectoidNode,ConjugateConnectoidNode> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceConjugateConnectoidNodes- Specified by:
deepCloneWithMappingin interfaceGraphEntities<ConjugateConnectoidNode>- Specified by:
deepCloneWithMappingin interfaceManagedGraphEntities<ConjugateConnectoidNode>- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<ConjugateConnectoidNode>- Specified by:
deepCloneWithMappingin classManagedGraphEntitiesImpl<ConjugateConnectoidNode>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
-