Class Link

  • All Implemented Interfaces:
    Comparable<Link>

    public class Link
    extends Point
    implements Comparable<Link>
    Implements comparable, which sorts by the 'x' coordinate and then secondarily by the 'y' coordinate. (This behavior is important for some applications).
    Author:
    Paul Pavlidis
    • Constructor Detail

      • Link

        public Link​(int i,
                    int j,
                    double weight)
        Parameters:
        i - int
        j - int
        weight - double
    • Method Detail

      • getWeight

        public double getWeight()
        Returns:
        double
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Point
      • toString

        public String toString()
        Overrides:
        toString in class Point
        Returns:
        java.lang.String