Package com.helger.commons.compare
Class NaturalNumericOrderComparator
java.lang.Object
com.helger.commons.compare.NaturalNumericOrderComparator
- All Implemented Interfaces:
Comparator<String>
A special comparator that ensures that e.g. "3.10" is sorted after "3.9".
- Since:
- 10.1.7
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
NaturalNumericOrderComparator
Constructor- Parameters:
aOtherComp- The comparator to be used, if there is no numeric stuff to compare.
-
-
Method Details
-
getOtherComparator
-
compare
- Specified by:
comparein interfaceComparator<String>
-