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 type
V - 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 Details

    • AbstractValueGraph

      public AbstractValueGraph()
  • Method Details

    • edgeValue

      public V edgeValue(Object nodeU, Object nodeV)
      Description copied from interface: ValueGraph
      If there is an edge connecting nodeU to nodeV, returns the non-null value associated with that edge.

      In an undirected graph, this is equal to edgeValue(nodeV, nodeU).

      Specified by:
      edgeValue in interface ValueGraph<N,V>
    • toString

      public String toString()
      Returns a string representation of this graph.
      Overrides:
      toString in class AbstractGraph<N>