- 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 TypeMethodDescriptionint
compare
(int i, int j) Compares its two arguments for order.
-
Method Details
-
compare
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 integerj
- 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
-