public class StringComparator
extends java.lang.Object
implements java.util.Comparator
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
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
caseSensitive |
protected StringComparator.LocaleRules |
localeRules |
Constructor and Description |
---|
StringComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2) |
StringComparator.LocaleRules |
getLocaleRules()
Gets an object with the information for use the locale rules in comparation between strings.
|
boolean |
isCaseSensitive()
Returns if the comparator is sensitive to small and big letters
|
void |
setCaseSensitive(boolean b)
Establece la sensibilidad del comparador a las mayusculas y minusculas
|
void |
setLocaleRules(StringComparator.LocaleRules locRules)
Sets an object with the information for use the locale rules in comparation between strings.
|
protected boolean caseSensitive
protected StringComparator.LocaleRules localeRules
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
Comparator.compare(java.lang.Object, java.lang.Object)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean b)
b
- public StringComparator.LocaleRules getLocaleRules()
public void setLocaleRules(StringComparator.LocaleRules locRules)
@see
- LocaleRules