weka.core
Class ClassDiscovery.StringCompare

java.lang.Object
  extended by weka.core.ClassDiscovery.StringCompare
All Implemented Interfaces:
Comparator, RevisionHandler
Enclosing class:
ClassDiscovery

public static class ClassDiscovery.StringCompare
extends Object
implements Comparator, RevisionHandler

compares two strings. The following order is used:


Constructor Summary
ClassDiscovery.StringCompare()
           
 
Method Summary
 int compare(Object o1, Object o2)
          Compares its two arguments for order.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this Comparator.
 String getRevision()
          Returns the revision string.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassDiscovery.StringCompare

public ClassDiscovery.StringCompare()
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares its two arguments for order.

Specified by:
compare in interface Comparator
Parameters:
o1 - the first object
o2 - the second object
Returns:
-1 if o1<o2, 0 if o1=o2 and 1 if o1&;gt;o2

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this Comparator.

Specified by:
equals in interface Comparator
Overrides:
equals in class Object
Parameters:
obj - the object to compare with this Comparator
Returns:
true if the object is a StringCompare object as well

getRevision

public String getRevision()
Returns the revision string.

Specified by:
getRevision in interface RevisionHandler
Returns:
the revision


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.