elemental.util.

Interface CanCompare<T>

  • Type Parameters:

    T -


    public interface CanCompare<T>

    A comparison function which imposes total ordering on a set of objects.

    See Also:

    ArrayOf.sort(CanCompare)

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      int compare(T a, T b)

      Compares its two arguments for order.

    • Method Detail

      • compare

        int compare(T a,
                    T b)

        Compares its two arguments for order.

        Parameters:

        a - the first object to be compared

        b - 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