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 ConjugateConnectoidNodesImpl
deepClone()
Deep clone implementationConjugateConnectoidNodesImpl
deepCloneWithMapping(BiConsumer<ConjugateConnectoidNode,ConjugateConnectoidNode> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapperConjugateConnectoidNodeFactory
getFactory()
Factory to create instance of graph entity (for this container class)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-
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:
getFactory
in interfaceConjugateConnectoidNodes
- Specified by:
getFactory
in interfaceGraphEntities<ConjugateConnectoidNode>
- Specified by:
getFactory
in 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:
shallowClone
in interfaceConjugateConnectoidNodes
- Specified by:
shallowClone
in interfaceGraphEntities<ConjugateConnectoidNode>
- Specified by:
shallowClone
in interfaceManagedGraphEntities<ConjugateConnectoidNode>
- Specified by:
shallowClone
in interfaceManagedIdEntities<ConjugateConnectoidNode>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,ConjugateConnectoidNode>
- Specified by:
shallowClone
in classManagedGraphEntitiesImpl<ConjugateConnectoidNode>
- Returns:
- copy
-
deepClone
public ConjugateConnectoidNodesImpl deepClone()
Deep clone implementation- Specified by:
deepClone
in interfaceConjugateConnectoidNodes
- Specified by:
deepClone
in interfaceGraphEntities<ConjugateConnectoidNode>
- Specified by:
deepClone
in interfaceManagedGraphEntities<ConjugateConnectoidNode>
- Specified by:
deepClone
in interfaceManagedIdEntities<ConjugateConnectoidNode>
- Specified by:
deepClone
in 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:
deepCloneWithMapping
in interfaceConjugateConnectoidNodes
- Specified by:
deepCloneWithMapping
in interfaceGraphEntities<ConjugateConnectoidNode>
- Specified by:
deepCloneWithMapping
in interfaceManagedGraphEntities<ConjugateConnectoidNode>
- Specified by:
deepCloneWithMapping
in interfaceManagedIdEntities<ConjugateConnectoidNode>
- Specified by:
deepCloneWithMapping
in classManagedGraphEntitiesImpl<ConjugateConnectoidNode>
- Parameters:
mapper
- to apply to each mapping between original and copy- Returns:
- copy
-
-