public class StringComparator extends Object implements Comparator<Object>
Compares two chain of characters alphabetically.
This class is a copy of a class with the same name located in libIverUtiles.
Modifier and Type | Class and Description |
---|---|
class |
StringComparator.LocaleRules
Represents the information needed by StringComparator for use or not locale-sensitive String
comparison-rules in the compare method.
|
Constructor and Description |
---|
StringComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Object o1,
Object o2) |
StringComparator.LocaleRules |
getLocaleRules()
Gets an object with the information for use the locale rules in comparison between strings.
|
boolean |
isCaseSensitive()
Determines if the comparator is sensitive to upper case and down case characters or not.
|
void |
setCaseSensitive(boolean b)
Sets the comparator sensitive or insensitive to upper case and down case characters.
|
void |
setLocaleRules(StringComparator.LocaleRules locRules)
Sets an object with the information for use the locale rules in comparison between strings.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public int compare(Object o1, Object o2)
compare
in interface Comparator<Object>
Comparator.compare(java.lang.Object, java.lang.Object)
public boolean isCaseSensitive()
true
if the comparator is sensitive to upper case and down case characters;
otherwise notpublic void setCaseSensitive(boolean b)
b
- true
if the comparator is sensitive to upper case and down case characters;
false
if notpublic StringComparator.LocaleRules getLocaleRules()
public void setLocaleRules(StringComparator.LocaleRules locRules)
@see
- LocaleRules