Package org.goplanit.utils.id
Interface ManagedIdEntities<E extends ManagedId>
-
- Type Parameters:
E
- type of managed id entity
- All Superinterfaces:
Cloneable
,Iterable<E>
,LongMapWrapper<E>
,MapWrapper<Long,E>
- All Known Subinterfaces:
Connectoids<T>
,DirectedConnectoids
,DirectedPaths
,Links
,LinkSegments
,MacroscopicLinkSegments
,MacroscopicLinkSegmentTypes
,MacroscopicNetworkLayers
,ManagedGraphEntities<E>
,Modes
,Nodes
,OdZones
,RoutedModeServices
,RoutedServicesLayers
,RoutedTripDepartures
,RoutedTrips<T>
,RoutedTripsFrequency
,RoutedTripsSchedule
,ServiceLegs
,ServiceLegSegments
,ServiceNetworkLayers
,ServiceNodes
,TopologicalLayers<T>
,TransferZoneGroups
,TransferZones
,TransportLayers<T>
,UndirectedConnectoids
,UntypedDirectedGraphLayers<L>
,UntypedPhysicalNetworkLayers<L>
,Zones<Z>
- All Known Implementing Classes:
ConnectoidEdgesImpl
,ConnectoidSegmentsImpl
,ConnectoidsImpl
,DirectedConnectoidsImpl
,DirectedPathsImpl
,LinkSegmentsImpl
,LinksImpl
,MacroscopicLinkSegmentsImpl
,MacroscopicLinkSegmentTypesImpl
,MacroscopicNetworkLayersImpl
,ManagedIdEntitiesImpl
,ModesImpl
,NodesImpl
,OdZonesImpl
,RoutedModeServicesImpl
,RoutedServicesLayersImpl
,RoutedTripDeparturesImpl
,RoutedTripsFrequencyImpl
,RoutedTripsImpl
,RoutedTripsScheduleImpl
,ServiceLegSegmentsImpl
,ServiceLegsImpl
,ServiceNetworkLayersImpl
,ServiceNodesImpl
,TopologicalLayersImpl
,TransferZoneGroupsImpl
,TransferZonesImpl
,TransportLayersImpl
,UndirectedConnectoidsImpl
,UntypedPhysicalNetworkLayersImpl
,ZonesImpl
public interface ManagedIdEntities<E extends ManagedId> extends LongMapWrapper<E>, Cloneable
Container class for any managed id derived entities and a factory to create them- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ManagedIdEntities<E>
clone()
Force clone implementationdefault boolean
containsKey(long id)
Verify if presentManagedIdEntityFactory<E>
getFactory()
Factory to create instance of managed id entity (for this container class)Class<? extends ManagedId>
getManagedIdClass()
Collect the class identifier used for the managed ids within the id group for instances of this class used in this containerdefault void
recreateIds()
Identical torecreateIds(boolean)
void
recreateIds(boolean resetManagedIdClass)
Recreate the ids for all registered entities with or without resettingdefault void
reset()
When reset it called, it not only clears the entries, but also resets the managedids, such that when the container is reused the managed ids start from zero again.-
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.wrapper.MapWrapper
addAll, clear, contains, findFirst, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, size, toCollection, valuesAsNewSet
-
-
-
-
Method Detail
-
getFactory
ManagedIdEntityFactory<E> getFactory()
Factory to create instance of managed id entity (for this container class)- Returns:
- entity factory
-
getManagedIdClass
Class<? extends ManagedId> getManagedIdClass()
Collect the class identifier used for the managed ids within the id group for instances of this class used in this container- Returns:
- managedIdClass for instances this factory creates
-
recreateIds
void recreateIds(boolean resetManagedIdClass)
Recreate the ids for all registered entities with or without resetting- 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
ManagedIdEntities<E> clone()
Force clone implementation- Specified by:
clone
in interfaceMapWrapper<Long,E extends ManagedId>
- Returns:
- clone of entities
-
containsKey
default boolean containsKey(long id)
Verify if present- Specified by:
containsKey
in interfaceLongMapWrapper<E extends ManagedId>
- Parameters:
id
- to verify- Returns:
- true when present false otherwise
-
recreateIds
default void recreateIds()
Identical torecreateIds(boolean)
-
reset
default void reset()
When reset it called, it not only clears the entries, but also resets the managedids, such that when the container is reused the managed ids start from zero again. If any entries are managedEntities themselves or contain managed entities themselves, they are reset as well
-
-