Class IntComparators.UnsignedOppositeComparator
java.lang.Object
com.github.tommyettinger.gand.utils.IntComparators.UnsignedOppositeComparator
- All Implemented Interfaces:
IntComparator
,Comparator<Integer>
- Enclosing class:
- IntComparators
protected static class IntComparators.UnsignedOppositeComparator
extends Object
implements IntComparator
A type-specific comparator that compares items in the opposite of the natural order, but as if they
are unsigned.
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface com.github.tommyettinger.gand.utils.IntComparator
compare, thenComparing, thenComparing
-
Constructor Details
-
UnsignedOppositeComparator
protected UnsignedOppositeComparator()
-
-
Method Details
-
compare
public final int compare(int a, int b) Description copied from interface:IntComparator
Compares its two primitive-type 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 interfaceIntComparator
- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
- See Also:
-
reversed
- Specified by:
reversed
in interfaceComparator<Integer>
- Specified by:
reversed
in interfaceIntComparator
-