Class DefaultWeightedEdge

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class DefaultWeightedEdge
    extends java.lang.Object
    A default implementation for edges in a weighted graph. All access to the weight of an edge must go through the graph interface, which is why this class doesn't expose any public methods.
    Author:
    John V. Sichi
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      protected java.lang.Object getSource()
      Retrieves the source of this edge.
      protected java.lang.Object getTarget()
      Retrieves the target of this edge.
      protected double getWeight()
      Retrieves the weight of this edge.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultWeightedEdge

        public DefaultWeightedEdge()
    • Method Detail

      • getSource

        protected java.lang.Object getSource()
        Retrieves the source of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).
        Returns:
        source of this edge
      • getTarget

        protected java.lang.Object getTarget()
        Retrieves the target of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).
        Returns:
        target of this edge
      • getWeight

        protected double getWeight()
        Retrieves the weight of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).
        Returns:
        weight of this edge
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
        See Also:
        Object.clone()