Package org.goplanit.network.virtual
Class ConnectoidSegmentsImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<ConnectoidSegment>
-
- org.goplanit.network.virtual.ConnectoidSegmentsImpl
-
- All Implemented Interfaces:
Cloneable,Iterable<ConnectoidSegment>,GraphEntities<ConnectoidSegment>,ManagedIdEntities<ConnectoidSegment>,ConnectoidSegments,LongMapWrapper<ConnectoidSegment>,MapWrapper<Long,ConnectoidSegment>
public class ConnectoidSegmentsImpl extends ManagedIdEntitiesImpl<ConnectoidSegment> implements ConnectoidSegments
Connectoid segments container implementation- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description ConnectoidSegmentsImpl(ConnectoidSegmentsImpl connectoidSegmentImpl)Copy constructorConnectoidSegmentsImpl(IdGroupingToken groupId)ConstructorConnectoidSegmentsImpl(IdGroupingToken groupId, ConnectoidSegmentFactory connectoidSegmentFactory)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()clear the containerConnectoidSegmentsImplclone()Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly createdConnectoidSegmentFactorygetFactory()Factory to create instance of graph entity (for this container class)voidrecreateIds(boolean resetManagedIdClass)Recreate the ids for all registered entities with or without resetting-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
getManagedIdClass, reset, updateIdMapping
-
Methods inherited from class org.goplanit.utils.wrapper.LongMapWrapperImpl
containsKey, get, remove
-
Methods inherited from class org.goplanit.utils.wrapper.MapWrapperImpl
contains, createEmptyInstance, findFirst, get, getKeyByValue, getMap, getValueToKey, isEmpty, iterator, register, remove, setMap, size, toCollection, valuesAsNewSet
-
Methods inherited from class java.lang.Object
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, recreateIds
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, contains, findFirst, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, size, toCollection, valuesAsNewSet
-
-
-
-
Constructor Detail
-
ConnectoidSegmentsImpl
public ConnectoidSegmentsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- to use for creating ids for instances
-
ConnectoidSegmentsImpl
public ConnectoidSegmentsImpl(IdGroupingToken groupId, ConnectoidSegmentFactory connectoidSegmentFactory)
Constructor- Parameters:
groupId- to use for creating ids for instancesconnectoidSegmentFactory- the factory to use
-
ConnectoidSegmentsImpl
public ConnectoidSegmentsImpl(ConnectoidSegmentsImpl connectoidSegmentImpl)
Copy constructor- Parameters:
connectoidSegmentImpl- to copy
-
-
Method Detail
-
getFactory
public ConnectoidSegmentFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactoryin interfaceConnectoidSegments- Specified by:
getFactoryin interfaceGraphEntities<ConnectoidSegment>- Specified by:
getFactoryin interfaceManagedIdEntities<ConnectoidSegment>- Returns:
- entity factory
-
recreateIds
public void recreateIds(boolean resetManagedIdClass)
Recreate the ids for all registered entities with or without resetting- Specified by:
recreateIdsin interfaceManagedIdEntities<ConnectoidSegment>- Overrides:
recreateIdsin classManagedIdEntitiesImpl<ConnectoidSegment>- Parameters:
resetManagedIdClass- when true we reset the managedId's counter to zero (via its id class) before recreating the ids, otherwise we simply recreate the managed id by starting with the next available id without resetting
-
clone
public ConnectoidSegmentsImpl clone()
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:
clonein interfaceConnectoidSegments- Specified by:
clonein interfaceGraphEntities<ConnectoidSegment>- Specified by:
clonein interfaceManagedIdEntities<ConnectoidSegment>- Specified by:
clonein interfaceMapWrapper<Long,ConnectoidSegment>- Specified by:
clonein classManagedIdEntitiesImpl<ConnectoidSegment>- Returns:
- copy
-
clear
public void clear()
clear the container- Specified by:
clearin interfaceMapWrapper<Long,ConnectoidSegment>- Overrides:
clearin classMapWrapperImpl<Long,ConnectoidSegment>
-
-