Class OkkamComparators


  • public class OkkamComparators
    extends Object
    • Method Detail

      • sortAscending

        public static <T extends Comparable<T>> Comparator<T> sortAscending()
        Comparator to sort ascending (or alphabetically for strings).
        Type Parameters:
        T - the type of the generic
        Returns:
        The comparator
      • sortDescending

        public static <T extends Comparable<T>> Comparator<T> sortDescending()
        Comparator to sort descending (or reverse alphabetically for strings).
        Type Parameters:
        T - the type of the generic
        Returns:
        The comparator