Class NodeImpl<LS extends EdgeSegment>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.graph.GraphEntityImpl
-
- org.goplanit.graph.VertexImpl<Edge>
-
- org.goplanit.graph.directed.DirectedVertexImpl<LS>
-
- org.goplanit.network.layer.physical.NodeImpl<LS>
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,DirectedVertex
,GraphEntity
,Vertex
,ExternalIdAble
,IdAble
,ManagedId
,Node
public class NodeImpl<LS extends EdgeSegment> extends DirectedVertexImpl<LS> 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.goplanit.graph.directed.DirectedVertexImpl
DirectedVertexImpl.EdgeSegmentIterable<ESI extends EdgeSegment>, DirectedVertexImpl.EdgeSegmentIterator<ES extends EdgeSegment>
-
-
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.graph.directed.DirectedVertex
getEntryEdgeSegments, getExitEdgeSegments
-
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<LS> other, boolean deepCopy)
Copy constructorprotected
NodeImpl(IdGroupingToken groupId)
Node constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeImpl<LS>
deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.String
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 nodeNodeImpl<LS>
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.graph.directed.DirectedVertexImpl
getEdges, getEntryEdgeSegments, getExitEdgeSegments
-
Methods inherited from class org.goplanit.graph.VertexImpl
addEdge, addInputProperty, getInputProperty, getPosition, removeAllEdges, 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedVertex
getEdges, getEdgeSegment, getEntryEdgeSegments, getExitEdgeSegments, getNumberOfEntryEdgeSegments, getNumberOfExitEdgeSegments, hasEntryEdgeSegments, hasEntrySegment, hasExitEdgeSegments, hasExitSegment
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId, 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
generateNodeId, getEntryLinkSegments, getExitLinkSegments, getFirstEntryLinkSegment, getFirstExitLinkSegment, getLinks, getLinkSegment, getNodeIdClass, hasLinks
-
Methods inherited from interface org.goplanit.utils.graph.Vertex
addEdge, addEdges, addInputProperty, getEdges, getIdClass, getInputProperty, getNumberOfEdges, getPosition, hasPosition, isPositionEqual2D, isPositionEqual2D, removeAllEdges, removeEdge, removeEdge, removeEdges, 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
-
-
Method Detail
-
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
-
shallowClone
public NodeImpl<LS> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceGraphEntity
- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceNode
- Specified by:
shallowClone
in interfaceVertex
- Overrides:
shallowClone
in classDirectedVertexImpl<LS extends EdgeSegment>
- Returns:
- shallow copy of entity
-
deepClone
public NodeImpl<LS> deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code- Specified by:
deepClone
in interfaceGraphEntity
- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in interfaceNode
- Specified by:
deepClone
in interfaceVertex
- Overrides:
deepClone
in classDirectedVertexImpl<LS extends EdgeSegment>
- Returns:
- deep copy of entity
-
getName
public String getName()
get the name of this node (if any)
-
-