weka.filters.unsupervised.attribute

## Class SortLabels.CaseSensitiveComparator

- java.lang.Object
- - weka.filters.unsupervised.attribute.SortLabels.CaseSensitiveComparator

- All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<java.lang.String>
  Enclosing class:
    SortLabels

      public static class SortLabels.CaseSensitiveComparator
      extends java.lang.Object
      implements java.util.Comparator<java.lang.String>, java.io.Serializable

  Represents a case-sensitive comparator for two strings.
  Version:
    $Revision: 12395 $
  Author:
    fracpete (fracpete at waikato dot ac dot nz)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CaseSensitiveComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(java.lang.String o1, java.lang.String o2)` compares the two strings, returns -1 if o1 is smaller than o2, 0 if equal and +1 if greater.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### CaseSensitiveComparator

          public CaseSensitiveComparator()

  - ### Method Detail

    - #### compare

          public int compare(java.lang.String o1,
                             java.lang.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 `java.util.Comparator<java.lang.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