oracle.bali.share.sort
Class LexiComparator
java.lang.Object
|
+--oracle.bali.share.sort.LexiComparator
- All Implemented Interfaces:
- Comparator
- public class LexiComparator
- extends java.lang.Object
- implements Comparator
This class implements a lexicographical Comparator for Strings.
Clients should generally use StringComparator, as this class
does not provide proper locale-specific ordering. However,
the default Java text collators require loading very large
(hundreds of K) tables, so, if a particular sort does not require
language-specific ordering, this class may offer improved
performance and reduced memory requirements.
- See Also:
StringComparator
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Implement the Comparator interface. |
static Comparator |
getComparator()
Returns the shared instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getComparator
public static Comparator getComparator()
- Returns the shared instance.
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Implement the Comparator interface.
- Specified by:
compare
in interface Comparator