Package weka.core
Class ClassDiscovery.StringCompare
java.lang.Object
weka.core.ClassDiscovery.StringCompare
- All Implemented Interfaces:
Comparator<String>
,RevisionHandler
- Enclosing class:
- ClassDiscovery
public static class ClassDiscovery.StringCompare
extends Object
implements Comparator<String>, RevisionHandler
compares two strings. The following order is used:
- case insensitive
- german umlauts (ä , ö etc.) or other non-ASCII letters are treated as special chars
- special chars < numbers < letters
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
StringCompare
public StringCompare()
-
-
Method Details
-
compare
Compares its two arguments for order.- Specified by:
compare
in interfaceComparator<String>
- Parameters:
o1
- the first objecto2
- the second object- Returns:
- -1 if o1<o2, 0 if o1=o2 and 1 if o1&;gt;o2
-
equals
Indicates whether some other object is "equal to" this Comparator.- Specified by:
equals
in interfaceComparator<String>
- Overrides:
equals
in classObject
- Parameters:
obj
- the object to compare with this Comparator- Returns:
- true if the object is a StringCompare object as well
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-