Class SortLabels.CaseInsensitiveComparator

java.lang.Object
weka.filters.unsupervised.attribute.SortLabels.CaseInsensitiveComparator
All Implemented Interfaces:
Serializable, Comparator<String>
Enclosing class:
SortLabels

public static class SortLabels.CaseInsensitiveComparator extends Object implements Comparator<String>, Serializable
Represents a case-insensitive comparator for two strings.
Version:
$Revision: 14508 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
  • Constructor Details

    • CaseInsensitiveComparator

      public CaseInsensitiveComparator()
  • Method Details

    • compare

      public int compare(String o1, String o2)
      compares the two strings, returns -1 if o1 is smaller than o2, 0 if equal and +1 if greater.
      Specified by:
      compare in interface Comparator<String>
      Parameters:
      o1 - the first string to compare
      o2 - the second string to compare
      Returns:
      returns -1 if o1 is smaller than o2, 0 if equal and +1 if greater