Class StringComparator

java.lang.Object
org.gvsig.gui.beans.comboboxconfigurablelookup.StringComparator
All Implemented Interfaces:
Comparator<Object>

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.

Author:
Fernando González Cortés, Pablo Piqueras Bartolomé invalid input: '<'pablo.piqueras@iver.es)
  • Constructor Details

    • StringComparator

      public StringComparator()
  • Method Details

    • compare

      public int compare(Object o1, Object o2)
      Specified by:
      compare in interface Comparator<Object>
      See Also:
    • isCaseSensitive

      public boolean isCaseSensitive()
      Determines if the comparator is sensitive to upper case and down case characters or not.
      Returns:
      true if 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 - true if the comparator is sensitive to upper case and down case characters; false if not
    • getLocaleRules

      public StringComparator.LocaleRules 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

      public void setLocaleRules(StringComparator.LocaleRules locRules)
      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.