Package org.goplanit.network.layer
Class MacroscopicNetworkLayerImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.network.layer.TransportLayerImpl
-
- org.goplanit.network.layer.TopologicalLayerImpl
-
- org.goplanit.network.layer.UntypedNetworkLayerImpl<N,L,LS>
-
- org.goplanit.network.layer.UntypedPhysicalLayerImpl<Node,Link,MacroscopicLinkSegment>
-
- org.goplanit.network.layer.MacroscopicNetworkLayerImpl
-
- All Implemented Interfaces:
Cloneable
,Comparable<IdAble>
,ExternalIdAble
,IdAble
,ManagedId
,MacroscopicNetworkLayer
,UntypedPhysicalLayer<Node,Link,MacroscopicLinkSegment>
,TopologicalLayer
,TransportLayer
,UntypedDirectedGraphLayer<Node,Link,MacroscopicLinkSegment>
public class MacroscopicNetworkLayerImpl extends UntypedPhysicalLayerImpl<Node,Link,MacroscopicLinkSegment> implements MacroscopicNetworkLayer
Macroscopic physical Network (layer) that supports one or more modes and link segment types, where the modes are registered on the network (Infrastructure network) level- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description MacroscopicLinkSegmentTypes
linkSegmentTypes
The container for the link segment types available across all link segments-
Fields inherited from class org.goplanit.network.layer.UntypedNetworkLayerImpl
layerModifier
-
Fields inherited from class org.goplanit.network.layer.TransportLayerImpl
supportedModes
-
Fields inherited from interface org.goplanit.utils.network.layer.TransportLayer
TRANSPORT_LAYER_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MacroscopicNetworkLayerImpl(MacroscopicNetworkLayerImpl macroscopicNetworkLayerImpl)
Copy constructorprotected
MacroscopicNetworkLayerImpl(IdGroupingToken groupId)
Constructorprotected
MacroscopicNetworkLayerImpl(IdGroupingToken groupId, Nodes nodes, Links links, MacroscopicLinkSegments linkSegments)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicNetworkLayerImpl
clone()
Create a shallow copy of this entityLinks
getLinks()
Collect the linksMacroscopicLinkSegments
getLinkSegments()
Collect the link segmentsMacroscopicLinkSegmentTypes
getLinkSegmentTypes()
collect the link segment types, alternative to using the public memberNodes
getNodes()
Collect the nodesvoid
logInfo(String prefix)
invoked by entities inquiring about general information about the layer to display to usersvoid
reset()
Reset the layervoid
resetChildManagedIdEntities()
Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers.-
Methods inherited from class org.goplanit.network.layer.UntypedNetworkLayerImpl
getGraph, getLayerIdGroupingToken, getLayerModifier, isEmpty, transform, validate
-
Methods inherited from class org.goplanit.network.layer.TransportLayerImpl
generateId, getSupportedModes, recreateManagedIds, registerSupportedMode, registerSupportedModes
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds
-
Methods inherited from interface org.goplanit.utils.network.layer.TopologicalLayer
transform
-
Methods inherited from interface org.goplanit.utils.network.layer.TransportLayer
getFirstSupportedMode, getIdClass, getSupportedModes, hasSupportedModes, isEmpty, registerSupportedMode, registerSupportedModes, supports, validate
-
Methods inherited from interface org.goplanit.utils.network.layer.UntypedDirectedGraphLayer
getLayerIdGroupingToken, getLayerModifier
-
Methods inherited from interface org.goplanit.utils.network.layer.physical.UntypedPhysicalLayer
getNumberOfLinks, getNumberOfLinkSegments, getNumberOfNodes
-
-
-
-
Field Detail
-
linkSegmentTypes
public final MacroscopicLinkSegmentTypes linkSegmentTypes
The container for the link segment types available across all link segments
-
-
Constructor Detail
-
MacroscopicNetworkLayerImpl
protected MacroscopicNetworkLayerImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
MacroscopicNetworkLayerImpl
protected MacroscopicNetworkLayerImpl(IdGroupingToken groupId, Nodes nodes, Links links, MacroscopicLinkSegments linkSegments)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classnodes
- to uselinks
- to uselinkSegments
- to use
-
MacroscopicNetworkLayerImpl
protected MacroscopicNetworkLayerImpl(MacroscopicNetworkLayerImpl macroscopicNetworkLayerImpl)
Copy constructor- Parameters:
macroscopicNetworkLayerImpl
- to copy
-
-
Method Detail
-
logInfo
public void logInfo(String prefix)
invoked by entities inquiring about general information about the layer to display to users- Specified by:
logInfo
in interfaceTransportLayer
- Overrides:
logInfo
in classUntypedPhysicalLayerImpl<Node,Link,MacroscopicLinkSegment>
- Parameters:
prefix
- optional prefix to include in each line of logging
-
getLinkSegmentTypes
public MacroscopicLinkSegmentTypes getLinkSegmentTypes()
collect the link segment types, alternative to using the public member- Specified by:
getLinkSegmentTypes
in interfaceMacroscopicNetworkLayer
- Returns:
- the link segment types
-
getLinks
public Links getLinks()
Collect the links- Specified by:
getLinks
in interfaceMacroscopicNetworkLayer
- Specified by:
getLinks
in interfaceUntypedPhysicalLayer<Node,Link,MacroscopicLinkSegment>
- Returns:
- the links
-
getLinkSegments
public MacroscopicLinkSegments getLinkSegments()
Collect the link segments- Specified by:
getLinkSegments
in interfaceMacroscopicNetworkLayer
- Specified by:
getLinkSegments
in interfaceUntypedPhysicalLayer<Node,Link,MacroscopicLinkSegment>
- Returns:
- the linkSegments
-
getNodes
public Nodes getNodes()
Collect the nodes- Specified by:
getNodes
in interfaceMacroscopicNetworkLayer
- Specified by:
getNodes
in interfaceUntypedPhysicalLayer<Node,Link,MacroscopicLinkSegment>
- Returns:
- the nodes
-
clone
public MacroscopicNetworkLayerImpl clone()
Create a shallow copy of this entity- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classUntypedPhysicalLayerImpl<Node,Link,MacroscopicLinkSegment>
- Returns:
- shallow copy of entity
-
reset
public void reset()
Reset the layer- Specified by:
reset
in interfaceTransportLayer
- Overrides:
reset
in classUntypedNetworkLayerImpl<Node,Link,MacroscopicLinkSegment>
-
resetChildManagedIdEntities
public void resetChildManagedIdEntities()
Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers. This ensures that when resetting such a container any child containers are also reset- Specified by:
resetChildManagedIdEntities
in interfaceManagedId
-
-