Class NodeImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.graph.GraphEntityImpl
-
- org.goplanit.graph.VertexImpl
-
- org.goplanit.graph.directed.DirectedVertexImpl
-
- org.goplanit.network.layer.physical.NodeImpl
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IdAble>
,DirectedVertex
,GraphEntity
,Vertex
,ExternalIdAble
,IdAble
,ManagedId
,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 String
name
name of the nodeprotected long
nodeId
Unique node identifier-
Fields inherited from class org.goplanit.graph.directed.DirectedVertexImpl
entryEdgeSegments, exitEdgeSegments
-
Fields inherited from class org.goplanit.graph.VertexImpl
edges, inputProperties, position
-
Fields inherited from interface org.goplanit.utils.network.layer.physical.Node
NODE_ID_CLASS
-
Fields inherited from interface org.goplanit.utils.graph.Vertex
VERTEX_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NodeImpl(NodeImpl nodeImpl)
Copy constructor, see alsoVertexImpl
protected
NodeImpl(IdGroupingToken groupId)
Node constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeImpl
clone()
Create a shallow copy of this entityprotected static long
generateNodeId(IdGroupingToken groupId)
generate unique node idString
getName()
get the name of this node (if any)long
getNodeId()
Collect the id of the node.void
setName(String name)
set the name of the nodeprotected void
setNodeId(long nodeId)
set the node id on this node-
Methods inherited from class org.goplanit.graph.directed.DirectedVertexImpl
addEdgeSegment, getEntryEdgeSegments, getExitEdgeSegments, removeEdgeSegment, removeEntryEdgeSegment, removeExitEdgeSegment
-
Methods inherited from class org.goplanit.graph.VertexImpl
addEdge, addInputProperty, getEdges, getInputProperty, getPosition, removeEdge, setPosition
-
Methods inherited from class org.goplanit.graph.GraphEntityImpl
generateAndSetId, generateId, recreateManagedIds, toString
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedVertex
addEdgeSegment, getEdgeSegment, getEntryEdgeSegments, getExitEdgeSegments, hasEntryEdgeSegments, hasExitEdgeSegments, removeEdgeSegment, removeEntryEdgeSegment, removeExitEdgeSegment, replace, replaceEntrySegment, replaceExitSegment, sizeOfEntryEdgeSegments, sizeOfExitEdgeSegments
-
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, resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.network.layer.physical.Node
getEntryLinkSegments, getExitLinkSegments, getFirstEntryLinkSegment, getFirstExitLinkSegment, getLinks, getLinkSegment, getNodeIdClass
-
Methods inherited from interface org.goplanit.utils.graph.Vertex
addEdge, addInputProperty, getEdges, getEdges, getIdClass, getInputProperty, getNumberOfEdges, getPosition, hasPosition, isPositionEqual2D, 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()
Create a shallow copy of this entity
-
getName
public String getName()
get the name of this node (if any)
-
-