Class FuzzyFloat.DoubleArrayComparatorLexical

java.lang.Object
org.plumelib.util.FuzzyFloat.DoubleArrayComparatorLexical
All Implemented Interfaces:
Serializable, Comparator<double[]>
Enclosing class:
FuzzyFloat

public class FuzzyFloat.DoubleArrayComparatorLexical extends Object implements Comparator<double[]>, Serializable
Lexically compares two double arrays.
See Also:
  • Constructor Details

    • DoubleArrayComparatorLexical

      public DoubleArrayComparatorLexical()
      Create a new DoubleArrayComparatorLexical.
  • Method Details

    • compare

      @Pure public int compare(double[] a1, double[] a2)
      Lexically compares o1 and o2 as double arrays.
      Specified by:
      compare in interface Comparator<double[]>
      Parameters:
      a1 - the first array to compare
      a2 - the second array to compare
      Returns:
      positive if o1 > 02, 0 if o1 == o2, negative if o1 < o2