Package org.dellroad.stuff.string
Class VersionPartComparator
java.lang.Object
org.dellroad.stuff.string.VersionPartComparator
- All Implemented Interfaces:
Serializable
,Comparator<String>
Comparator for version number parts.
This comparator puts numerical parts before non-numerical parts. Then, numerical parts are compared numerically, and non-numerical parts are compared lexically.
- See Also:
-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
VersionPartComparator
public VersionPartComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<String>
-