- java.lang.Object
-
- org.arakhne.afc.util.NaturalOrderComparator<OBJECT>
-
- Type Parameters:
OBJECT
- is the type of the objects to compare to.
- All Implemented Interfaces:
Comparator<OBJECT>
public class NaturalOrderComparator<OBJECT> extends Object implements Comparator<OBJECT>
Comparator which is using the natural order of the elements, i.e. the elements must implementsComparable
- Version:
- 17.0 2020-01-04 14:41:38
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- util
-
-
Constructor Summary
Constructors Constructor Description NaturalOrderComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(OBJECT o1, OBJECT o2)
-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
@Pure public int compare(OBJECT o1, OBJECT o2)
- Specified by:
compare
in interfaceComparator<OBJECT>
-
-