Class 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 Detail

      • AbstractValueGraph

        public AbstractValueGraph()
    • Method Detail

      • edgeValue

        public V edgeValue​(java.lang.Object nodeU,
                           java.lang.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 java.lang.String toString()
        Returns a string representation of this graph.
        Overrides:
        toString in class AbstractGraph<N>