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