public class PreferNumericComparator extends AlphanumComparator
AlphanumComparator, followed up with a standard String comparison if
AlphanumComparator.compare(String, String)returns 0.
If the requirement is that
Comparator.compare(Object, Object) return
0 for two numerically identical Strings (i.e.
42 == 0042), use
AlphanumComparator, but if the requirement is that Strings should be
numerically ordered, but that non-identical representations should be
42 != 0042, but order should be
3, 4, 5, 42, 0042, 50), use this Comparator, since the standard
String comparator will not order numbers correctly.