- java.lang.Object
-
- org.refcodes.textual.NumberSuffixComparator
-
- All Implemented Interfaces:
Comparator<String>
- Direct Known Subclasses:
NumberSuffixComparatorSingleton
public class NumberSuffixComparator extends Object implements Comparator<String>
Comparator for strings with prefixed numbers taking into account the value(!) of the prefixed number: Eg. "foo1" < "foo10"
-
-
Constructor Summary
Constructors Constructor Description NumberSuffixComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(String o1, String 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
public int compare(String o1, String o2)
- Specified by:
compare
in interfaceComparator<String>
-
-