Class DoubleObjPair<O>

  • Type Parameters:
    O - Object type
    All Implemented Interfaces:
    java.lang.Comparable<DoubleObjPair<O>>

    public class DoubleObjPair<O>
    extends java.lang.Object
    implements java.lang.Comparable<DoubleObjPair<O>>
    Pair storing a native double value and an arbitrary object.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double first
      Double value
      O second
      Second object value
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleObjPair​(double first, O second)
      Constructor.
    • Field Detail

      • first

        public double first
        Double value
      • second

        public O second
        Second object value
    • Constructor Detail

      • DoubleObjPair

        public DoubleObjPair​(double first,
                             O second)
        Constructor.
        Parameters:
        first - First value
        second - Second value
    • Method Detail

      • compareTo

        public int compareTo​(DoubleObjPair<O> o)
        Specified by:
        compareTo in interface java.lang.Comparable<O>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Canonical toString operator
        Overrides:
        toString in class java.lang.Object