Bali Share 1.1.18

oracle.bali.share.sort
Class StringComparator

java.lang.Object
  |
  +--oracle.bali.share.sort.StringComparator
All Implemented Interfaces:
Comparator

public class StringComparator
extends java.lang.Object
implements Comparator

This class implements a Comparator for Strings. It uses the java.text.Collator class to perform the string comparisons.

See Also:
Comparator, Collator

Constructor Summary
StringComparator(java.text.Collator collator)
          Create the StringComparator using the given Collator.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Implement the Comparator interface by calling through to the Collators compare interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringComparator

public StringComparator(java.text.Collator collator)
Create the StringComparator using the given Collator.
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Implement the Comparator interface by calling through to the Collators compare interface.
Specified by:
compare in interface Comparator

Bali Share 1.1.18