Package org.goplanit.network
Class TransportLayerNetwork<U extends TransportLayer,T extends TransportLayers<U>>
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Network>
-
- org.goplanit.network.Network
-
- org.goplanit.network.TransportLayerNetwork<U,T>
-
- Type Parameters:
U
- transport layer base classT
- transport layer container class where each layer extends<U>
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,EventListener
,ExternalIdAble
,IdAble
- Direct Known Subclasses:
TopologicalLayerNetwork
public abstract class TransportLayerNetwork<U extends TransportLayer,T extends TransportLayers<U>> extends Network
A transport network with one or more layers. One can choose the container for the different layers as a generic type that defines the container level operations available. Each container has a certain base class for the TransportLayer entities which is the second generic type. This allows one to have a base class for each layer, while the layer itself can derive from this base level. This way the user has maximum flexibility regarding what the functionality and properties of each layer are and how they are exposed via the container- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.goplanit.network.Network
MACROSCOPIC_NETWORK, networkIdGroupingToken
-
-
Constructor Summary
Constructors Constructor Description TransportLayerNetwork(IdGroupingToken tokenId)
Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T
createLayersContainer(IdGroupingToken networkIdToken)
Derived type is to provide the actual layer implementationsU
getLayerByMode(Mode mode)
collect a layer by modeModes
getModes()
Collect the modesT
getTransportLayers()
Collect the transport layersvoid
reset()
All components should be able to reset going back to some representative initial state-
Methods inherited from class org.goplanit.network.Network
clone, getNetworkGroupingTokenId
-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
hasExternalId, hasXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
TransportLayerNetwork
public TransportLayerNetwork(IdGroupingToken tokenId)
Default constructor- Parameters:
tokenId
- to use for id generation
-
-
Method Detail
-
createLayersContainer
protected abstract T createLayersContainer(IdGroupingToken networkIdToken)
Derived type is to provide the actual layer implementations- Parameters:
networkIdToken
- to use- Returns:
- infrastructure layers container
-
getLayerByMode
public U getLayerByMode(Mode mode)
collect a layer by mode- Parameters:
mode
- to collect layer for- Returns:
- corresponding layer, (null if not found)
-
getModes
public Modes getModes()
Collect the modes- Returns:
- modes container
-
getTransportLayers
public T getTransportLayers()
Collect the transport layers- Returns:
- transport layers container
-
-