Class ConjugateNodesImpl
- 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<ConjugateNode>
-
- org.goplanit.network.layer.physical.ConjugateNodesImpl
-
- All Implemented Interfaces:
Cloneable,Iterable<ConjugateNode>,GraphEntities<ConjugateNode>,ManagedGraphEntities<ConjugateNode>,ManagedIdEntities<ConjugateNode>,ConjugateNodes,LongMapWrapper<ConjugateNode>,MapWrapper<Long,ConjugateNode>
public class ConjugateNodesImpl extends ManagedGraphEntitiesImpl<ConjugateNode> implements ConjugateNodes
Conjugate nodes primary managed container implementation.- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description ConjugateNodesImpl(ConjugateNodesImpl other, boolean deepCopy, BiConsumer<ConjugateNode,ConjugateNode> mapper)Copy constructor, also creates new factory with this as its underlying containerConjugateNodesImpl(IdGroupingToken groupId)ConstructorConjugateNodesImpl(IdGroupingToken groupId, ConjugateNodeFactory nodeFactory)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateNodesImpldeepClone()Deep clone implementationConjugateNodesImpldeepCloneWithMapping(BiConsumer<ConjugateNode,ConjugateNode> mapper)Deep clone implementation where the mapping for its internal copies is captured by the provided mapperConjugateNodeFactorygetFactory()Factory to create instance of graph entity (for this container class)ConjugateNodesImplshallowClone()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
-
ConjugateNodesImpl
public ConjugateNodesImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- to use for creating ids for instances
-
ConjugateNodesImpl
public ConjugateNodesImpl(IdGroupingToken groupId, ConjugateNodeFactory nodeFactory)
Constructor- Parameters:
groupId- to use for creating ids for instancesnodeFactory- the factory to use
-
ConjugateNodesImpl
public ConjugateNodesImpl(ConjugateNodesImpl other, boolean deepCopy, BiConsumer<ConjugateNode,ConjugateNode> 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- apply to each mapping from original to copy
-
-
Method Detail
-
getFactory
public ConjugateNodeFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactoryin interfaceConjugateNodes- Specified by:
getFactoryin interfaceGraphEntities<ConjugateNode>- Specified by:
getFactoryin interfaceManagedIdEntities<ConjugateNode>- Returns:
- entity factory
-
shallowClone
public ConjugateNodesImpl 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 interfaceConjugateNodes- Specified by:
shallowClonein interfaceGraphEntities<ConjugateNode>- Specified by:
shallowClonein interfaceManagedGraphEntities<ConjugateNode>- Specified by:
shallowClonein interfaceManagedIdEntities<ConjugateNode>- Specified by:
shallowClonein interfaceMapWrapper<Long,ConjugateNode>- Specified by:
shallowClonein classManagedGraphEntitiesImpl<ConjugateNode>- Returns:
- copy
-
deepClone
public ConjugateNodesImpl deepClone()
Deep clone implementation- Specified by:
deepClonein interfaceConjugateNodes- Specified by:
deepClonein interfaceGraphEntities<ConjugateNode>- Specified by:
deepClonein interfaceManagedGraphEntities<ConjugateNode>- Specified by:
deepClonein interfaceManagedIdEntities<ConjugateNode>- Specified by:
deepClonein classManagedGraphEntitiesImpl<ConjugateNode>- Returns:
- deep copy of entities
-
deepCloneWithMapping
public ConjugateNodesImpl deepCloneWithMapping(BiConsumer<ConjugateNode,ConjugateNode> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMappingin interfaceConjugateNodes- Specified by:
deepCloneWithMappingin interfaceGraphEntities<ConjugateNode>- Specified by:
deepCloneWithMappingin interfaceManagedGraphEntities<ConjugateNode>- Specified by:
deepCloneWithMappingin interfaceManagedIdEntities<ConjugateNode>- Specified by:
deepCloneWithMappingin classManagedGraphEntitiesImpl<ConjugateNode>- Parameters:
mapper- to apply to each mapping between original and copy- Returns:
- copy
-
-