Interface IntComparator

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Comparator for int values.
Since:
4.1
Version:
4.1
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare(int i, int j)
    Compares its two arguments for order.
  • Method Details

    • compare

      int compare(int i, int j)
      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.
      Parameters:
      i - the first integer
      j - the second integer
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second