Package org.goplanit.network.layers
Class TopologicalLayersImpl<T extends TopologicalLayer>
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<T>
-
- org.goplanit.network.layers.TransportLayersImpl<T>
-
- org.goplanit.network.layers.TopologicalLayersImpl<T>
-
- All Implemented Interfaces:
Iterable<T>
,ManagedIdEntities<T>
,NetworkLayers<T>
,TopologicalLayers<T>
,LongMapWrapper<T>
,MapWrapper<Long,T>
- Direct Known Subclasses:
ServiceNetworkLayersImpl
,UntypedPhysicalNetworkLayersImpl
public abstract class TopologicalLayersImpl<T extends TopologicalLayer> extends TransportLayersImpl<T> implements TopologicalLayers<T>
implementation of the transport layers interface, without the createNew() method, but now with base layer class of TopologicalLayer- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Constructor Description TopologicalLayersImpl(TopologicalLayersImpl<T> other, boolean deepCopy, BiConsumer<T,T> mapper)
ConstructorTopologicalLayersImpl(IdGroupingToken groupingId)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract TopologicalLayersImpl<T>
deepClone()
Deep clone implementationabstract TopologicalLayersImpl<T>
deepCloneWithMapping(BiConsumer<T,T> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapperabstract TopologicalLayersImpl<T>
shallowClone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly created-
Methods inherited from class org.goplanit.network.layers.TransportLayersImpl
get, getByXmlId, getIdToken
-
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, containsValue, createEmptyInstance, firstMatch, get, getKeyByValue, getMap, getValueToKey, isEmpty, iterator, register, remove, removeIf, setMap, size, toCollection, valuesAsNewSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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, groupBy, recreateIds, recreateIds, reset, streamSortedBy
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, clear, containsValue, firstMatch, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, removeAll, removeIf, size, stream, streamSorted, toCollection, toMap, valuesAsNewSet
-
Methods inherited from interface org.goplanit.utils.network.layers.NetworkLayers
get, get, getByXmlId, getLayersOfType, getSupportedModes, isEachLayerEmpty
-
-
-
-
Constructor Detail
-
TopologicalLayersImpl
public TopologicalLayersImpl(IdGroupingToken groupingId)
Constructor- Parameters:
groupingId
- for id generation
-
TopologicalLayersImpl
public TopologicalLayersImpl(TopologicalLayersImpl<T> other, boolean deepCopy, BiConsumer<T,T> mapper)
Constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwisemapper
- apply to each mapping from original to copy
-
-
Method Detail
-
shallowClone
public abstract TopologicalLayersImpl<T> shallowClone()
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:
shallowClone
in interfaceManagedIdEntities<T extends TopologicalLayer>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,T extends TopologicalLayer>
- Specified by:
shallowClone
in interfaceNetworkLayers<T extends TopologicalLayer>
- Specified by:
shallowClone
in interfaceTopologicalLayers<T extends TopologicalLayer>
- Specified by:
shallowClone
in classTransportLayersImpl<T extends TopologicalLayer>
- Returns:
- copy
-
deepClone
public abstract TopologicalLayersImpl<T> deepClone()
Deep clone implementation- Specified by:
deepClone
in interfaceManagedIdEntities<T extends TopologicalLayer>
- Specified by:
deepClone
in interfaceNetworkLayers<T extends TopologicalLayer>
- Specified by:
deepClone
in interfaceTopologicalLayers<T extends TopologicalLayer>
- Specified by:
deepClone
in classTransportLayersImpl<T extends TopologicalLayer>
- Returns:
- deep copy of entities
-
deepCloneWithMapping
public abstract TopologicalLayersImpl<T> deepCloneWithMapping(BiConsumer<T,T> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMapping
in interfaceManagedIdEntities<T extends TopologicalLayer>
- Specified by:
deepCloneWithMapping
in interfaceNetworkLayers<T extends TopologicalLayer>
- Specified by:
deepCloneWithMapping
in classTransportLayersImpl<T extends TopologicalLayer>
- Parameters:
mapper
- to apply to each mapping between original and copy- Returns:
- copy
-
-