- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator<java.lang.String>
public class StringComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>, java.io.Serializable
A comparator on strings that is useful for sorting numbered names.
If the strings to be compared are not equal
and only differ in a numeric suffix, then
return the result of comparing the suffixes
using Integer.compare. Otherwise, return the
result of String.compareTo.
- Author:
- Thomas Strathmann
- See Also:
- Serialized Form