Package org.goplanit.network
Class Network
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Network>
-
- org.goplanit.network.Network
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,EventListener
,ExternalIdAble
,IdAble
- Direct Known Subclasses:
TransportLayerNetwork
,VirtualNetwork
public class Network extends PlanitComponent<Network> implements Serializable
Base class for any network. A network can be macroscopic or otherwise and in turn can be physical or not, etc. This all depends on its implementation. However in all cases it represents something that allows movement of one or more modes across the locations it represents.- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
MACROSCOPIC_NETWORK
shorthand for creating a macroscopic infrastructure networkprotected IdGroupingToken
networkIdGroupingToken
a token for this network in particular to ensure unique ids across all entities of the same class instance within this network
-
Constructor Summary
Constructors Constructor Description Network(Network network)
Copy constructorNetwork(IdGroupingToken tokenId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Network
clone()
Clone the networkIdGroupingToken
getNetworkGroupingTokenId()
collect the grouping token for this network instancevoid
reset()
All components should be able to reset going back to some representative initial state-
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
-
-
-
-
Field Detail
-
networkIdGroupingToken
protected IdGroupingToken networkIdGroupingToken
a token for this network in particular to ensure unique ids across all entities of the same class instance within this network
-
MACROSCOPIC_NETWORK
public static final String MACROSCOPIC_NETWORK
shorthand for creating a macroscopic infrastructure network
-
-
Constructor Detail
-
Network
public Network(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId
- contiguous id generation within this group for instances of this class
-
Network
public Network(Network network)
Copy constructor- Parameters:
network
- to clone
-
-
Method Detail
-
getNetworkGroupingTokenId
public IdGroupingToken getNetworkGroupingTokenId()
collect the grouping token for this network instance- Returns:
- id grouping token
-
clone
public Network clone()
Clone the network- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classPlanitComponent<Network>
- Returns:
- cloned network
-
reset
public void reset()
All components should be able to reset going back to some representative initial state- Specified by:
reset
in classPlanitComponent<Network>
-
-