Package org.goplanit.zoning
Class UndirectedConnectoidsImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<T>
-
- org.goplanit.zoning.ConnectoidsImpl<UndirectedConnectoid>
-
- org.goplanit.zoning.UndirectedConnectoidsImpl
-
- All Implemented Interfaces:
Cloneable
,Iterable<UndirectedConnectoid>
,EventListener
,EventListener
,ManagedIdEntities<UndirectedConnectoid>
,LongMapWrapper<UndirectedConnectoid>
,MapWrapper<Long,UndirectedConnectoid>
,Connectoids<UndirectedConnectoid>
,ZoningModifierListener
,UndirectedConnectoids
public class UndirectedConnectoidsImpl extends ConnectoidsImpl<UndirectedConnectoid> implements UndirectedConnectoids
Implementation of Connectoids class- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description UndirectedConnectoidsImpl(IdGroupingToken groupId)
ConstructorUndirectedConnectoidsImpl(IdGroupingToken groupId, UndirectedConnectoidFactory undirectedConnectoidFactory)
ConstructorUndirectedConnectoidsImpl(UndirectedConnectoidsImpl other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UndirectedConnectoidsImpl
clone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly createdUndirectedConnectoidFactory
getFactory()
Factory to create instance of managed id entity (for this container class)void
recreateIds(boolean resetManagedIdClass)
Recreate the ids for all registered entities with or without resetting-
Methods inherited from class org.goplanit.zoning.ConnectoidsImpl
getKnownSupportedEventTypes, onZoningModifierEvent, updateConnectoidAccessZoneIdReferences
-
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
clear, 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.event.EventListener
getKnownSupportedEventTypes, hasKnownSupportedEventTypes
-
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, recreateIds, reset
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, clear, contains, findFirst, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, size, toCollection, valuesAsNewSet
-
Methods inherited from interface org.goplanit.utils.zoning.modifier.event.ZoningModifierListener
onZoningModifierEvent
-
-
-
-
Constructor Detail
-
UndirectedConnectoidsImpl
public UndirectedConnectoidsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- to use for creating ids for instances
-
UndirectedConnectoidsImpl
public UndirectedConnectoidsImpl(IdGroupingToken groupId, UndirectedConnectoidFactory undirectedConnectoidFactory)
Constructor- Parameters:
groupId
- to use for creating ids for instancesundirectedConnectoidFactory
- the factory to use
-
UndirectedConnectoidsImpl
public UndirectedConnectoidsImpl(UndirectedConnectoidsImpl other)
Copy constructor- Parameters:
other
- to copy
-
-
Method Detail
-
getFactory
public UndirectedConnectoidFactory getFactory()
Factory to create instance of managed id entity (for this container class)- Specified by:
getFactory
in interfaceManagedIdEntities<UndirectedConnectoid>
- Specified by:
getFactory
in interfaceUndirectedConnectoids
- Returns:
- entity factory
-
recreateIds
public void recreateIds(boolean resetManagedIdClass)
Recreate the ids for all registered entities with or without resetting- Specified by:
recreateIds
in interfaceManagedIdEntities<UndirectedConnectoid>
- Overrides:
recreateIds
in classManagedIdEntitiesImpl<UndirectedConnectoid>
- 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 UndirectedConnectoidsImpl 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:
clone
in interfaceManagedIdEntities<UndirectedConnectoid>
- Specified by:
clone
in interfaceMapWrapper<Long,UndirectedConnectoid>
- Specified by:
clone
in interfaceUndirectedConnectoids
- Specified by:
clone
in classConnectoidsImpl<UndirectedConnectoid>
- Returns:
- copy
-
-