Package org.goplanit.zoning
Class ConnectoidsImpl<T extends Connectoid>
- 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<T>
-
- All Implemented Interfaces:
Cloneable
,Iterable<T>
,EventListener
,EventListener
,ManagedIdEntities<T>
,LongMapWrapper<T>
,MapWrapper<Long,T>
,Connectoids<T>
,ZoningModifierListener
- Direct Known Subclasses:
DirectedConnectoidsImpl
,UndirectedConnectoidsImpl
public abstract class ConnectoidsImpl<T extends Connectoid> extends ManagedIdEntitiesImpl<T> implements Connectoids<T>
Base implementation of Connectoids container and factory class- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description ConnectoidsImpl(IdGroupingToken groupId)
ConstructorConnectoidsImpl(ConnectoidsImpl<T> connectoidsImpl)
Copy constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ConnectoidsImpl<T>
clone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly createdEventType[]
getKnownSupportedEventTypes()
Collect explicitly supported event types that are known.void
onZoningModifierEvent(ZoningModificationEvent event)
Support event callbacks whenever zones have been modifiedprotected void
updateConnectoidAccessZoneIdReferences()
update the references to all access zones for all connectoids-
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, 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
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, getFactory, getManagedIdClass, recreateIds, 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
-
-
-
-
Constructor Detail
-
ConnectoidsImpl
public ConnectoidsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- to use for creating ids for instances
-
ConnectoidsImpl
public ConnectoidsImpl(ConnectoidsImpl<T> connectoidsImpl)
Copy constructor- Parameters:
connectoidsImpl
- to copy
-
-
Method Detail
-
updateConnectoidAccessZoneIdReferences
protected void updateConnectoidAccessZoneIdReferences()
update the references to all access zones for all connectoids
-
clone
public abstract ConnectoidsImpl<T> 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<T extends Connectoid>
- Specified by:
clone
in interfaceMapWrapper<Long,T extends Connectoid>
- Specified by:
clone
in classManagedIdEntitiesImpl<T extends Connectoid>
- Returns:
- copy
-
getKnownSupportedEventTypes
public EventType[] getKnownSupportedEventTypes()
Collect explicitly supported event types that are known. When not defined the user has to explicitly provide them upon registering the listener on an event producer, otherwise they can be extracted from here- Specified by:
getKnownSupportedEventTypes
in interfaceEventListener
- Returns:
- the supported event types
-
onZoningModifierEvent
public void onZoningModifierEvent(ZoningModificationEvent event)
Support event callbacks whenever zones have been modified- Specified by:
onZoningModifierEvent
in interfaceZoningModifierListener
- Parameters:
event
- representing the zoning modification event at hand
-
-