N
- Node parameter typeV
- Value parameter typeinterface GraphConnections<N,V>
Graph
.Modifier and Type | Method and Description |
---|---|
void |
addPredecessor(N node,
V value)
Add
node as a predecessor to the origin node. |
V |
addSuccessor(N node,
V value)
Add
node as a successor to the origin node. |
java.util.Set<N> |
adjacentNodes() |
java.util.Set<N> |
predecessors() |
void |
removePredecessor(java.lang.Object node)
Remove
node from the set of predecessors. |
V |
removeSuccessor(java.lang.Object node)
Remove
node from the set of successors. |
java.util.Set<N> |
successors() |
V |
value(java.lang.Object node)
Returns the value associated with the edge connecting the origin node to
node , or null
if there is no such edge. |
java.util.Set<N> adjacentNodes()
java.util.Set<N> predecessors()
java.util.Set<N> successors()
@Nullable V value(java.lang.Object node)
node
, or null
if there is no such edge.void removePredecessor(java.lang.Object node)
node
from the set of predecessors.V removeSuccessor(java.lang.Object node)
node
from the set of successors. Returns the value previously associated with
the edge connecting the two nodes.void addPredecessor(N node, V value)
node
as a predecessor to the origin node. In the case of an undirected graph, it
also becomes a successor. Associates value
with the edge connecting the two nodes.