Class StringComparator
java.lang.Object
org.gvsig.gui.beans.comboboxconfigurablelookup.StringComparator
- All Implemented Interfaces:
Comparator<Object>
Compares two chain of characters alphabetically.
This class is a copy of a class with the same name located in libIverUtiles.
- Author:
- Fernando González Cortés, Pablo Piqueras Bartolomé invalid input: '<'pablo.piqueras@iver.es)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassRepresents the information needed by StringComparator for use or not locale-sensitive String comparison-rules in the compare method. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets an object with the information for use the locale rules in comparison between strings.booleanDetermines if the comparator is sensitive to upper case and down case characters or not.voidsetCaseSensitive(boolean b) Sets the comparator sensitive or insensitive to upper case and down case characters.voidsetLocaleRules(StringComparator.LocaleRules locRules) Sets an object with the information for use the locale rules in comparison between strings.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
StringComparator
public StringComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Object>- See Also:
-
isCaseSensitive
public boolean isCaseSensitive()Determines if the comparator is sensitive to upper case and down case characters or not.- Returns:
trueif the comparator is sensitive to upper case and down case characters; otherwise not
-
setCaseSensitive
public void setCaseSensitive(boolean b) Sets the comparator sensitive or insensitive to upper case and down case characters.- Parameters:
b-trueif the comparator is sensitive to upper case and down case characters;falseif not
-
getLocaleRules
Gets an object with the information for use the locale rules in comparison between strings.- A boolean value -> if want or not use the locale rules
- A reference to the locale rules
- Returns:
- @see LocaleRules
-
setLocaleRules
Sets an object with the information for use the locale rules in comparison between strings.- A boolean value -> if want or not use the locale rules.
- A reference to the locale rules.
-