Package org.goplanit.zoning
Class TransferZoneGroupsImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<TransferZoneGroup>
-
- org.goplanit.zoning.TransferZoneGroupsImpl
-
- All Implemented Interfaces:
Cloneable
,Iterable<TransferZoneGroup>
,EventListener
,EventListener
,ManagedIdEntities<TransferZoneGroup>
,LongMapWrapper<TransferZoneGroup>
,MapWrapper<Long,TransferZoneGroup>
,ZoningModifierListener
,TransferZoneGroups
public class TransferZoneGroupsImpl extends ManagedIdEntitiesImpl<TransferZoneGroup> implements TransferZoneGroups
Container for transfer zone groups where each transfer zone group logically groups multiple transfer zones together. Practically this can be used to represent public transport stations for example- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description TransferZoneGroupsImpl(IdGroupingToken groupId)
ConstructorTransferZoneGroupsImpl(IdGroupingToken groupId, TransferZoneGroupFactory transferZoneGroupFactory)
ConstructorTransferZoneGroupsImpl(TransferZoneGroupsImpl other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransferZoneGroupsImpl
clone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly createdTransferZoneGroupFactory
getFactory()
Factory to create instance of managed id entity (for this container class)EventType[]
getKnownSupportedEventTypes()
Collect explicitly supported event types that are known.void
onZoningModifierEvent(ZoningModificationEvent event)
Notify method for zoning modification eventsprotected void
recreateTransferZoneGroupsZoneIdMapping()
Update all transfer zone groups' id mappings for underlying transfer zones since the transfer zone id might have changed-
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, 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
-
TransferZoneGroupsImpl
public TransferZoneGroupsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- to use for creating ids for instances
-
TransferZoneGroupsImpl
public TransferZoneGroupsImpl(IdGroupingToken groupId, TransferZoneGroupFactory transferZoneGroupFactory)
Constructor- Parameters:
groupId
- to use for creating ids for instancestransferZoneGroupFactory
- the factory to use
-
TransferZoneGroupsImpl
public TransferZoneGroupsImpl(TransferZoneGroupsImpl other)
Copy constructor- Parameters:
other
- to copy
-
-
Method Detail
-
recreateTransferZoneGroupsZoneIdMapping
protected void recreateTransferZoneGroupsZoneIdMapping()
Update all transfer zone groups' id mappings for underlying transfer zones since the transfer zone id might have changed
-
getFactory
public TransferZoneGroupFactory getFactory()
Factory to create instance of managed id entity (for this container class)- Specified by:
getFactory
in interfaceManagedIdEntities<TransferZoneGroup>
- Specified by:
getFactory
in interfaceTransferZoneGroups
- Returns:
- entity factory
-
clone
public TransferZoneGroupsImpl 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<TransferZoneGroup>
- Specified by:
clone
in interfaceMapWrapper<Long,TransferZoneGroup>
- Specified by:
clone
in interfaceTransferZoneGroups
- Specified by:
clone
in classManagedIdEntitiesImpl<TransferZoneGroup>
- 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)
Notify method for zoning modification events- Specified by:
onZoningModifierEvent
in interfaceZoningModifierListener
- Parameters:
event
- representing the zoning modification event at hand
-
-