Class SortLabels.CaseSensitiveComparator
- java.lang.Object
-
- weka.filters.unsupervised.attribute.SortLabels.CaseSensitiveComparator
-
- All Implemented Interfaces:
Serializable,Comparator<String>
- Enclosing class:
- SortLabels
public static class SortLabels.CaseSensitiveComparator extends Object implements Comparator<String>, Serializable
Represents a case-sensitive comparator for two strings.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CaseSensitiveComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(String o1, 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
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
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:
comparein interfaceComparator<String>- Parameters:
o1- the first string to compareo2- the second string to compare- Returns:
- returns -1 if o1 is smaller than o2, 0 if equal and +1 if greater
-
-