public class StringComparator extends Object implements 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(Object o1,
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalsprotected boolean caseSensitive
protected StringComparator.LocaleRules localeRules
public int compare(Object o1, Object o2)
compare in interface ComparatorComparator.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