Class Comparators

java.lang.Object
eu.bandm.tools.util.java.Comparators

public abstract class Comparators extends Object
Library of constants and combinators for classes implementing Comparator.
  • Method Details

    • neutral

      public static <A> Comparator<A> neutral()
    • natural

      public static <A extends Comparable<? super A>> Comparator<A> natural()
    • lexical

      public static <A> Comparator<A> lexical(List<? extends Comparator<? super A>> dims)
    • compare

      public static int compare(float a, float b, float epsilon)
    • equals

      public static boolean equals(float a, float b, float epsilon)
    • measure

      public static <A, B> Comparator<A> measure(Function<? super A,? extends B> meas, Comparator<? super B> comp)
    • measure

      public static <A, B extends Comparable<? super B>> Comparator<A> measure(Function<? super A,? extends B> meas)
    • sequence

      public static <A> Comparator<A> sequence(List<? extends A> elems)
    • entryComparator

      public static <A, B> Comparators.EntryComparator<A,B> entryComparator(Comparator<? super A> c)
    • entryComparator

      public static <A, B> Comparators.EntryComparator<A,B> entryComparator()
    • compare

      public static <A> int compare(A x, A y)
    • compare

      public static <A> int compare(Comparator<? super A> c, A x, A y)