Package com.google.common.graph
Class AbstractValueGraph<N,V>
java.lang.Object
com.google.common.graph.AbstractGraph<N>
com.google.common.graph.AbstractValueGraph<N,V>
- Type Parameters:
N
- Node parameter typeV
- Value parameter type
- All Implemented Interfaces:
Graph<N>
,ValueGraph<N,
V>
@Beta
public abstract class AbstractValueGraph<N,V>
extends AbstractGraph<N>
implements ValueGraph<N,V>
This class provides a skeletal implementation of
ValueGraph
. It is recommended to extend
this class rather than implement ValueGraph
directly.- Since:
- 20.0
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.common.graph.AbstractGraph
degree, edgeCount, edges, inDegree, outDegree
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.graph.Graph
adjacentNodes, allowsSelfLoops, degree, edges, inDegree, isDirected, nodeOrder, nodes, outDegree, predecessors, successors
Methods inherited from interface com.google.common.graph.ValueGraph
edgeValueOrDefault, equals, hashCode
-
Constructor Details
-
AbstractValueGraph
public AbstractValueGraph()
-
-
Method Details
-
edgeValue
Description copied from interface:ValueGraph
If there is an edge connectingnodeU
tonodeV
, returns the non-null value associated with that edge.In an undirected graph, this is equal to
edgeValue(nodeV, nodeU)
.- Specified by:
edgeValue
in interfaceValueGraph<N,
V>
-
toString
Returns a string representation of this graph.- Overrides:
toString
in classAbstractGraph<N>
-