Package org.planit.network.physical
Class NodeImpl
- java.lang.Object
-
- org.planit.graph.VertexImpl
-
- org.planit.network.physical.NodeImpl
-
- All Implemented Interfaces:
Serializable
,Comparable<Vertex>
,Vertex
,Node
public class NodeImpl extends VertexImpl implements Node
Node representation connected to one or more entry and exit links- Author:
- markr
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.planit.graph.VertexImpl
VertexImpl.EdgeSegmentsImpl, VertexImpl.EdgesImpl
-
Nested classes/interfaces inherited from interface org.planit.utils.graph.Vertex
Vertex.Edges, Vertex.EdgeSegments
-
-
Field Summary
Fields Modifier and Type Field Description protected Object
externalId
External identifier used in input filesprotected long
nodeId
Unique node identifier-
Fields inherited from class org.planit.graph.VertexImpl
centrePointGeometry, edges, entryEdgeSegments, exitEdgeSegments, id, inputProperties
-
-
Constructor Summary
Constructors Constructor Description NodeImpl(IdGroupingToken groupId)
Node constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static int
generateNodeId(IdGroupingToken groupId)
generate unique node idObject
getExternalId()
Collect the external id of the nodelong
getNodeId()
Collect the id of the node.boolean
hasExternalId()
Returns whether the node has an external Id setvoid
setExternalId(Object externalId)
Set the external id of the node-
Methods inherited from class org.planit.graph.VertexImpl
addInputProperty, compareTo, generateVertexId, getCentrePointGeometry, getEdges, getEntryEdgeSegments, getExitEdgeSegments, getId, getInputProperty, setCentrePointGeometry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.planit.utils.graph.Vertex
getCentrePointGeometry, getEdges, getEntryEdgeSegments, getExitEdgeSegments, getId, setCentrePointGeometry
-
-
-
-
Field Detail
-
nodeId
protected final long nodeId
Unique node identifier
-
externalId
protected Object externalId
External identifier used in input files
-
-
Constructor Detail
-
NodeImpl
public NodeImpl(IdGroupingToken groupId)
Node constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
-
Method Detail
-
generateNodeId
protected static int generateNodeId(IdGroupingToken groupId)
generate unique node id- Parameters:
groupId
- contiguous id generation within this group for instances of this class- Returns:
- nodeId
-
getExternalId
public Object getExternalId()
Collect the external id of the node- Specified by:
getExternalId
in interfaceNode
- Returns:
- external id
-
setExternalId
public void setExternalId(Object externalId)
Set the external id of the node- Specified by:
setExternalId
in interfaceNode
- Parameters:
externalId
- the external id to set
-
hasExternalId
public boolean hasExternalId()
Returns whether the node has an external Id set- Specified by:
hasExternalId
in interfaceNode
- Returns:
- true if the node has an external Id, false otherwise
-
-