Package org.planit.network.physical
Class NodeImpl
- java.lang.Object
-
- org.planit.graph.VertexImpl
-
- org.planit.graph.DirectedVertexImpl
-
- org.planit.network.physical.NodeImpl
-
- All Implemented Interfaces:
Serializable,Comparable<Idable>,DirectedVertex,Vertex,ExternalIdable,Idable,Node
public class NodeImpl extends DirectedVertexImpl implements Node
Node representation connected to one or more entry and exit links- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringnamename of the nodeprotected longnodeIdUnique node identifier-
Fields inherited from class org.planit.graph.DirectedVertexImpl
entryEdgeSegments, exitEdgeSegments
-
Fields inherited from class org.planit.graph.VertexImpl
edges, externalId, id, inputProperties, position
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNodeImpl(NodeImpl nodeImpl)Copy constructor, see alsoVertexImplprotectedNodeImpl(IdGroupingToken groupId)Node constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeImplclone()Clone the vertexprotected static longgenerateNodeId(IdGroupingToken groupId)generate unique node idStringgetName()get the name of this node (if any)longgetNodeId()Collect the id of the node.voidsetName(String name)set the name of the nodeprotected voidsetNodeId(long nodeId)set the node id on this node-
Methods inherited from class org.planit.graph.DirectedVertexImpl
addEdgeSegment, getEntryEdgeSegments, getExitEdgeSegments, getNumberOfEntryEdgeSegments, getNumberOfExitEdgeSegments, hasEntryEdgeSegments, hasExitEdgeSegments, removeEdgeSegment
-
Methods inherited from class org.planit.graph.VertexImpl
addEdge, addInputProperty, generateVertexId, getEdges, getEdges, getExternalId, getId, getInputProperty, getNumberOfEdges, getPosition, getXmlId, removeEdge, removeEdge, setExternalId, setId, setPosition, setXmlId, validate
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.planit.utils.graph.DirectedVertex
addEdgeSegment, getEdgeSegment, getEntryEdgeSegments, getExitEdgeSegments, getNumberOfEntryEdgeSegments, getNumberOfExitEdgeSegments, hasEntryEdgeSegments, hasExitEdgeSegments, removeEdgeSegment, replace
-
Methods inherited from interface org.planit.utils.id.ExternalIdable
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.planit.utils.id.Idable
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.planit.utils.network.physical.Node
getEntryLinkSegments, getExitLinkSegments, getLinks, getLinkSegment
-
Methods inherited from interface org.planit.utils.graph.Vertex
addEdge, addInputProperty, getEdges, getEdges, getNumberOfEdges, getPosition, removeEdge, removeEdge, replace, setPosition, transformPosition, validate
-
-
-
-
Field Detail
-
nodeId
protected long nodeId
Unique node identifier
-
name
protected String name
name of the node
-
-
Constructor Detail
-
NodeImpl
protected NodeImpl(IdGroupingToken groupId)
Node constructor- Parameters:
groupId- contiguous id generation within this group for instances of this class
-
NodeImpl
protected NodeImpl(NodeImpl nodeImpl)
Copy constructor, see alsoVertexImpl- Parameters:
nodeImpl- to copy
-
-
Method Detail
-
generateNodeId
protected static long generateNodeId(IdGroupingToken groupId)
generate unique node id- Parameters:
groupId- contiguous id generation within this group for instances of this class- Returns:
- nodeId
-
setNodeId
protected void setNodeId(long nodeId)
set the node id on this node- Parameters:
nodeId- to set
-
getNodeId
public long getNodeId()
Collect the id of the node. Not all vertices need to be nodes, this node id is contiguous and unique to the nodes in the network, but not necessarily across all vertices in the network
-
clone
public NodeImpl clone()
Clone the vertex- Specified by:
clonein interfaceVertex- Overrides:
clonein classDirectedVertexImpl- Returns:
- the cloned vertex
-
getName
public String getName()
get the name of this node (if any)
-
-