Interface DirectedVertex
-
- All Superinterfaces:
Cloneable
,Comparable<IdAble>
,ExternalIdAble
,GraphEntity
,IdAble
,ManagedId
,Serializable
,Vertex
- All Known Subinterfaces:
Centroid
,Node
,ServiceNode
- All Known Implementing Classes:
CentroidImpl
,DirectedVertexImpl
,NodeImpl
,ServiceNodeImpl
public interface DirectedVertex extends Vertex
Directed vertex representation connected to one or more edge segments that have direction. The vertex itself is of course not directional- Author:
- markr
-
-
Field Summary
-
Fields inherited from interface org.goplanit.utils.graph.Vertex
LOGGER, VERTEX_ID_CLASS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description 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.default EdgeSegment
getEdgeSegment(DirectedVertex otherVertex)
collect the first edge segment corresponding to the provided other vertexSet<EdgeSegment>
getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)Set<EdgeSegment>
getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)default boolean
hasEntryEdgeSegments()
Test whether no entry edge segments have been registereddefault boolean
hasExitEdgeSegments()
Test whether no exit edge segments have been registereddefault boolean
removeEdgeSegment(EdgeSegment edgeSegment)
Remove edgeSegment on either entry or exit side of vertexboolean
removeEntryEdgeSegment(EdgeSegment edgeSegment)
Remove entry edgeSegmentboolean
removeExitEdgeSegment(EdgeSegment edgeSegment)
Remove exit edgeSegmentdefault boolean
replace(EdgeSegment edgeSegmentToReplace, EdgeSegment edgeSegmentToReplaceWith, boolean forceInsert)
replace edge segmentdefault boolean
replaceEntrySegment(EdgeSegment edgeSegmentToReplace, EdgeSegment edgeSegmentToReplaceWith, boolean forceInsert)
Identical to replace, only now we consider solely the exist segments for the replacing (in case the to replace segment could be an entry segment that we must keep)default boolean
replaceExitSegment(EdgeSegment edgeSegmentToReplace, EdgeSegment edgeSegmentToReplaceWith, boolean forceInsert)
Identical to replace, only now we consider solely the exist segments for the replacing (in case the to replace segment could be an entry segment that we must keep)default int
sizeOfEntryEdgeSegments()
Collect the number of entry edge segments of this vertexdefault int
sizeOfExitEdgeSegments()
Collect the number of exit edge segments of this vertex-
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, clone, getEdges, getEdges, getIdClass, getInputProperty, getNumberOfEdges, getPosition, hasPosition, isPositionEqual2D, removeEdge, removeEdge, replace, setPosition, transformPosition, validate
-
-
-
-
Method Detail
-
addEdgeSegment
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.- Parameters:
edgeSegment
- EdgeSegment object to be added- Returns:
- true when added, false when already present (and not added)
-
removeEdgeSegment
default boolean removeEdgeSegment(EdgeSegment edgeSegment)
Remove edgeSegment on either entry or exit side of vertex- Parameters:
edgeSegment
- EdgeSegment object to be removed- Returns:
- true when removed, false when not present (and not removed)
-
removeEntryEdgeSegment
boolean removeEntryEdgeSegment(EdgeSegment edgeSegment)
Remove entry edgeSegment- Parameters:
edgeSegment
- EdgeSegment object to be removed- Returns:
- true when removed, false when not present (and not removed)
-
removeExitEdgeSegment
boolean removeExitEdgeSegment(EdgeSegment edgeSegment)
Remove exit edgeSegment- Parameters:
edgeSegment
- EdgeSegment object to be removed- Returns:
- true when removed, false when not present (and not removed)
-
getEntryEdgeSegments
Set<EdgeSegment> getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)- Returns:
- edgeSegments
-
getExitEdgeSegments
Set<EdgeSegment> getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)- Returns:
- edgeSegments
-
replace
default boolean replace(EdgeSegment edgeSegmentToReplace, EdgeSegment edgeSegmentToReplaceWith, boolean forceInsert)
replace edge segment- Parameters:
edgeSegmentToReplace
- to replaceedgeSegmentToReplaceWith
- to replace withforceInsert
- when edge segment to replace cannot be found, replacement is still inserted when true, when false not- Returns:
- true when replacement/insert was successful
-
replaceExitSegment
default boolean replaceExitSegment(EdgeSegment edgeSegmentToReplace, EdgeSegment edgeSegmentToReplaceWith, boolean forceInsert)
Identical to replace, only now we consider solely the exist segments for the replacing (in case the to replace segment could be an entry segment that we must keep)- Parameters:
edgeSegmentToReplace
- to replaceedgeSegmentToReplaceWith
- to replace withforceInsert
- when edge segment to replace cannot be found, replacement is still inserted when true, when false not- Returns:
- true when replacement/insert was successful
-
replaceEntrySegment
default boolean replaceEntrySegment(EdgeSegment edgeSegmentToReplace, EdgeSegment edgeSegmentToReplaceWith, boolean forceInsert)
Identical to replace, only now we consider solely the exist segments for the replacing (in case the to replace segment could be an entry segment that we must keep)- Parameters:
edgeSegmentToReplace
- to replaceedgeSegmentToReplaceWith
- to replace withforceInsert
- when edge segment to replace cannot be found, replacement is still inserted when true, when false not- Returns:
- true when replacement/insert was successful
-
getEdgeSegment
default EdgeSegment getEdgeSegment(DirectedVertex otherVertex)
collect the first edge segment corresponding to the provided other vertex- Parameters:
otherVertex
- to use- Returns:
- first edge segment matching this signature
-
hasExitEdgeSegments
default boolean hasExitEdgeSegments()
Test whether no exit edge segments have been registered- Returns:
- true if no exit edge segments have been registered, false otherwise
-
hasEntryEdgeSegments
default boolean hasEntryEdgeSegments()
Test whether no entry edge segments have been registered- Returns:
- true if no entry edge segments have been registered, false otherwise
-
sizeOfEntryEdgeSegments
default int sizeOfEntryEdgeSegments()
Collect the number of entry edge segments of this vertex- Returns:
- number of entry edge segments
-
sizeOfExitEdgeSegments
default int sizeOfExitEdgeSegments()
Collect the number of exit edge segments of this vertex- Returns:
- number of exit edge segments
-
-