Interface TransportLayers<T extends TransportLayer>
-
- All Superinterfaces:
Cloneable,Iterable<T>,LongMapWrapper<T>,ManagedIdEntities<T>,MapWrapper<Long,T>
- All Known Subinterfaces:
MacroscopicNetworkLayers,ServiceNetworkLayers,TopologicalLayers<T>,UntypedDirectedGraphLayers<L>,UntypedPhysicalNetworkLayers<L>
- All Known Implementing Classes:
MacroscopicNetworkLayersImpl,ServiceNetworkLayersImpl,TopologicalLayersImpl,TransportLayersImpl,UntypedPhysicalNetworkLayersImpl
public interface TransportLayers<T extends TransportLayer> extends ManagedIdEntities<T>
interface to manage transport layers.- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TransportLayers<T>clone()clone containerTget(Mode mode)Find the layer that supports the passed in mode.TgetByXmlId(String xmlId)Find the layer based on non-indexed XML id rather than the managed internal id.default <U extends TransportLayer>
Collection<U>getLayersOfType()Allows you to collect all registered layers of a specific derived transport layer typedefault booleanisEachLayerEmpty()Check if each layer itself is emptydefault booleanisNoLayers()When there are no layers the instance is considered empty-
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
-
-
-
-
Method Detail
-
get
T get(Mode mode)
Find the layer that supports the passed in mode. Since a mode is only allowed to be supported by a single layer, this should yield the correct result. If multiple layers support the same mode for some reason, this method returns the first layer that supports the mode- Parameters:
mode- to find the layer for- Returns:
- first matching layer
-
getByXmlId
T getByXmlId(String xmlId)
Find the layer based on non-indexed XML id rather than the managed internal id.- Parameters:
xmlId- to find the layer for- Returns:
- first matching layer
-
isNoLayers
default boolean isNoLayers()
When there are no layers the instance is considered empty- Returns:
- true when no layers exist yet, false otherwise
-
isEachLayerEmpty
default boolean isEachLayerEmpty()
Check if each layer itself is empty- Returns:
- true when all empty false otherwise
-
getLayersOfType
default <U extends TransportLayer> Collection<U> getLayersOfType()
Allows you to collect all registered layers of a specific derived transport layer type- Type Parameters:
U- derived type of type T- Returns:
- list of layers of desired type, empty list when none exist
-
clone
TransportLayers<T> clone()
clone container- Specified by:
clonein interfaceManagedIdEntities<T extends TransportLayer>- Specified by:
clonein interfaceMapWrapper<Long,T extends TransportLayer>- Returns:
- clone of entities
-
-