Package org.goplanit.graph.directed
Class DirectedVertexImpl
- 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
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IdAble>,DirectedVertex,GraphEntity,Vertex,ExternalIdAble,IdAble,ManagedId
- Direct Known Subclasses:
CentroidImpl,NodeImpl,ServiceNodeImpl
public class DirectedVertexImpl extends VertexImpl implements DirectedVertex
vertex representation connected to one or more entry and exit edges- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<EdgeSegment>entryEdgeSegmentsEntry edge segments which connect to this vertexprotected Set<EdgeSegment>exitEdgeSegmentsExit edge segments which connect to this vertex-
Fields inherited from class org.goplanit.graph.VertexImpl
edges, inputProperties, position
-
Fields inherited from interface org.goplanit.utils.graph.Vertex
VERTEX_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDirectedVertexImpl(DirectedVertexImpl directedVertexImpl)Copy constructorprotectedDirectedVertexImpl(IdGroupingToken groupId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddEdgeSegment(EdgeSegment edgeSegment)Add edgeSegment, do not invoke when parsing networks, this connection is auto-populated before the assignment starts based on the edge segment vertices that have been registered.DirectedVertexImplclone()Create a shallow copy of this entitySet<EdgeSegment>getEntryEdgeSegments()Collect the entry edge segments of this vertex (unmodifiable)Set<EdgeSegment>getExitEdgeSegments()Collect the exit edge segments of this vertex (unmodifiable)booleanremoveEdgeSegment(EdgeSegment edgeSegment)Remove edgeSegment on either entry or exit side of vertexbooleanremoveEntryEdgeSegment(EdgeSegment edgeSegment)Remove entry edgeSegmentbooleanremoveExitEdgeSegment(EdgeSegment edgeSegment)Remove exit edgeSegment-
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
getEdgeSegment, hasEntryEdgeSegments, hasExitEdgeSegments, 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.graph.Vertex
addEdge, addInputProperty, getEdges, getEdges, getIdClass, getInputProperty, getNumberOfEdges, getPosition, hasPosition, isPositionEqual2D, removeEdge, removeEdge, replace, setPosition, transformPosition, validate
-
-
-
-
Field Detail
-
entryEdgeSegments
protected final Set<EdgeSegment> entryEdgeSegments
Entry edge segments which connect to this vertex
-
exitEdgeSegments
protected final Set<EdgeSegment> exitEdgeSegments
Exit edge segments which connect to this vertex
-
-
Constructor Detail
-
DirectedVertexImpl
protected DirectedVertexImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId- , contiguous id generation within this group for instances of this class
-
DirectedVertexImpl
protected DirectedVertexImpl(DirectedVertexImpl directedVertexImpl)
Copy constructor- Parameters:
directedVertexImpl- to copy
-
-
Method Detail
-
getEntryEdgeSegments
public Set<EdgeSegment> getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)- Specified by:
getEntryEdgeSegmentsin interfaceDirectedVertex- Returns:
- edgeSegments
-
getExitEdgeSegments
public Set<EdgeSegment> getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)- Specified by:
getExitEdgeSegmentsin interfaceDirectedVertex- Returns:
- edgeSegments
-
addEdgeSegment
public boolean addEdgeSegment(EdgeSegment edgeSegment)
Add edgeSegment, do not invoke when parsing networks, this connection is auto-populated before the assignment starts based on the edge segment vertices that have been registered.- Specified by:
addEdgeSegmentin interfaceDirectedVertex- Parameters:
edgeSegment- EdgeSegment object to be added- Returns:
- true when added, false when already present (and not added)
-
removeEdgeSegment
public boolean removeEdgeSegment(EdgeSegment edgeSegment)
Remove edgeSegment on either entry or exit side of vertex- Specified by:
removeEdgeSegmentin interfaceDirectedVertex- Parameters:
edgeSegment- EdgeSegment object to be removed- Returns:
- true when removed, false when not present (and not removed)
-
removeEntryEdgeSegment
public boolean removeEntryEdgeSegment(EdgeSegment edgeSegment)
Remove entry edgeSegment- Specified by:
removeEntryEdgeSegmentin interfaceDirectedVertex- Parameters:
edgeSegment- EdgeSegment object to be removed- Returns:
- true when removed, false when not present (and not removed)
-
removeExitEdgeSegment
public boolean removeExitEdgeSegment(EdgeSegment edgeSegment)
Remove exit edgeSegment- Specified by:
removeExitEdgeSegmentin interfaceDirectedVertex- Parameters:
edgeSegment- EdgeSegment object to be removed- Returns:
- true when removed, false when not present (and not removed)
-
clone
public DirectedVertexImpl clone()
Create a shallow copy of this entity
-
-