T - generic typepublic class IntuitiveStringComparator<T extends CharSequence> extends Object implements Comparator<T>
A comparator that emulates the "intuitive" sorting used by Windows Explorer. The rules are as follows:
Explorer's sort order for punctuation characters is not quite the same as their ASCII order. Also, some characters aren't allowed in file names, so I don't know how they would be sorted. This class just sorts them all according to their ASCII values.
This comparator is only guaranteed to work with 7-bit ASCII strings.
| Constructor and Description |
|---|
IntuitiveStringComparator() |
public int compare(T s1, T s2)
compare in interface Comparator<T extends CharSequence>Copyright © 2009-2013 IRD. All Rights Reserved.