Class StateUtilities.DescendingComparator<T extends Comparable>

    • Constructor Detail

      • DescendingComparator

        public DescendingComparator()
        Default constructor.
    • Method Detail

      • compare

        public int compare​(T c1,
                           T c2)
        Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

        Specified by:
        compare in interface Comparator<T extends Comparable>
        Parameters:
        c1 - the first object to be compared.
        c2 - the second object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
        Throws:
        ClassCastException - if the arguments' types prevent them from being compared by this Comparator.