ValueGraph implementations to be backed by a provided delegate. This is
not currently planned to be released as a general-purpose forwarding class.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Set | adjacentNodes(N node)
Implements com. node in
this graph.
|
| public boolean | allowsSelfLoops()
Implements com. |
| public int | degree(N node)
Overrides com. Implements com. node's incident edges, counting self-loops twice (equivalently,
the number of times an edge touches node).
|
| pack-priv abstract ValueGraph | |
| protected long | edgeCount()
Overrides com. AbstractValueGraph#edges() (based on successors(Object)) for full
edges() implementation.
|
| public Optional | edgeValue(N nodeU, N nodeV)
Overrides com. Implements com. nodeU to nodeV (in the order, if
any, specified by endpoints), if one is present; otherwise, returns Optional.empty().
|
| public Optional | edgeValue(EndpointPair<N> endpoints)
Overrides com. Implements com. endpoints (in the order, if any, specified
by endpoints), if one is present; otherwise, returns Optional.empty().
|
| public V | edgeValueOrDefault(N nodeU, N nodeV, V defaultValue)
Implements com. nodeU to nodeV, if one is present;
otherwise, returns defaultValue.
|
| public V | edgeValueOrDefault(EndpointPair<N> endpoints, V defaultValue)
Implements com. endpoints (in the order, if any, specified
by endpoints), if one is present; otherwise, returns defaultValue.
|
| public boolean | hasEdgeConnecting(N nodeU, N nodeV)
Overrides com. Implements com. nodeU to nodeV.
|
| public boolean | hasEdgeConnecting(EndpointPair<N> endpoints)
Overrides com. Implements com. endpoints (in the order, if
any, specified by endpoints).
|
| public ElementOrder | incidentEdgeOrder()
Overrides com. Implements com. ElementOrder that specifies the order of iteration for the elements of
edges(), adjacentNodes(Object), predecessors(Object), successors(Object) and incidentEdges(Object).
|
| public int | inDegree(N node)
Overrides com. Implements com. node's incoming edges (equal to predecessors(node).size())
in a directed graph.
|
| public boolean | isDirected()
Implements com. |
| public ElementOrder | nodeOrder()
Implements com. nodes().
|
| public Set | nodes()
Implements com. nodeOrder().
|
| public int | outDegree(N node)
Overrides com. Implements com. node's outgoing edges (equal to successors(node).size())
in a directed graph.
|
| public Set | predecessors(N node)
Implements com. node which can be reached by
traversing node's incoming edges against the direction (if any) of the edge.
|
| public Set | successors(N node)
Implements com. node which can be reached by
traversing node's outgoing edges in the direction (if any) of the edge.
|
| ForwardingValueGraph | back to summary |
|---|---|
| pack-priv ForwardingValueGraph() | |
| adjacentNodes | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of the nodes which have an incident edge in common with This is equal to the union of If
| |
| allowsSelfLoops | back to summary |
|---|---|
| public boolean allowsSelfLoops() Implements com. Doc from com. Returns true if this graph allows self-loops (edges that connect a node to itself). Attempting
to add a self-loop to a graph that does not allow them will throw an
| |
| degree | back to summary |
|---|---|
| public int degree(N node) Overrides com. Implements com. Doc from com. Returns the count of For directed graphs, this is equal to For undirected graphs, this is equal to If the count is greater than
| |
| delegate | back to summary |
|---|---|
| pack-priv abstract ValueGraph | |
| edgeCount | back to summary |
|---|---|
| protected long edgeCount() Overrides com. Defer to
| |
| edgeValue | back to summary |
|---|---|
| public Optional Overrides com. Implements com. Doc from com. Returns the value of the edge that connects
| |
| edgeValue | back to summary |
|---|---|
| public Optional Overrides com. Implements com. Doc from com. Returns the value of the edge that connects If this graph is directed, the endpoints must be ordered.
| |
| edgeValueOrDefault | back to summary |
|---|---|
| public V edgeValueOrDefault(N nodeU, N nodeV, V defaultValue) Implements com. Doc from com. Returns the value of the edge that connects In an undirected graph, this is equal to
| |
| edgeValueOrDefault | back to summary |
|---|---|
| public V edgeValueOrDefault(EndpointPair<N> endpoints, V defaultValue) Implements com. Doc from com. Returns the value of the edge that connects If this graph is directed, the endpoints must be ordered.
| |
| hasEdgeConnecting | back to summary |
|---|---|
| public boolean hasEdgeConnecting(N nodeU, N nodeV) Overrides com. Implements com. Doc from com. Returns true if there is an edge that directly connects In an undirected graph, this is equal to
| |
| hasEdgeConnecting | back to summary |
|---|---|
| public boolean hasEdgeConnecting(EndpointPair<N> endpoints) Overrides com. Implements com. Doc from com. Returns true if there is an edge that directly connects Unlike the other
| |
| incidentEdgeOrder | back to summary |
|---|---|
| public ElementOrder Overrides com. Implements com. Doc from com. Returns an
| |
| inDegree | back to summary |
|---|---|
| public int inDegree(N node) Overrides com. Implements com. Doc from com. Returns the count of If the count is greater than
| |
| isDirected | back to summary |
|---|---|
| public boolean isDirected() Implements com. Doc from com. Returns true if the edges in this graph are directed. Directed edges connect a
| |
| nodeOrder | back to summary |
|---|---|
| public ElementOrder Implements com. Doc from com. Returns the order of iteration for the elements of
| |
| nodes | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns all nodes in this graph, in the order specified by
| |
| outDegree | back to summary |
|---|---|
| public int outDegree(N node) Overrides com. Implements com. Doc from com. Returns the count of If the count is greater than
| |
| predecessors | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of all nodes in this graph adjacent to In an undirected graph, this is equivalent to If
| |
| successors | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of all nodes in this graph adjacent to In an undirected graph, this is equivalent to This is not the same as "all nodes reachable from If
| |