Class SortLabels.CaseInsensitiveComparator
- java.lang.Object
-
- weka.filters.unsupervised.attribute.SortLabels.CaseInsensitiveComparator
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Comparator<java.lang.String>
- Enclosing class:
- SortLabels
public static class SortLabels.CaseInsensitiveComparator extends java.lang.Object implements java.util.Comparator<java.lang.String>, java.io.SerializableRepresents a case-insensitive comparator for two strings.- Version:
- $Revision: 14534 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(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.
-
-
-
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:
comparein interfacejava.util.Comparator<java.lang.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
-
-