de.lmu.ifi.dbs.elki.data
Class ClassLabel

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.ClassLabel
All Implemented Interfaces:
Comparable<ClassLabel>
Direct Known Subclasses:
HierarchicalClassLabel, SimpleClassLabel

public abstract class ClassLabel
extends Object
implements Comparable<ClassLabel>

A ClassLabel to identify a certain class of objects that is to discern from other classes by a classifier.


Nested Class Summary
static class ClassLabel.Factory<L extends ClassLabel>
          Class label factory
 
Constructor Summary
protected ClassLabel()
          ClassLabels need an empty constructor for dynamic access.
 
Method Summary
 boolean equals(Object obj)
          Any ClassLabel should ensure a natural ordering that is consistent with equals.
 int hashCode()
          Returns the hashCode of the String-representation of this ClassLabel.
abstract  String toString()
          Any ClassLabel requires a method to represent the label as a String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ClassLabel

protected ClassLabel()
ClassLabels need an empty constructor for dynamic access. Subsequently, the init method must be called.

Method Detail

equals

public boolean equals(Object obj)
Any ClassLabel should ensure a natural ordering that is consistent with equals. Thus, if this.compareTo(o)==0, then this.equals(o) should be true.

Overrides:
equals in class Object
Parameters:
obj - an object to test for equality w.r.t. this ClassLabel
Returns:
true, if this==obj || this.compareTo(o)==0, false otherwise

toString

public abstract String toString()
Any ClassLabel requires a method to represent the label as a String. If ClassLabel a.equals((ClassLabel) b), then also a.toString().equals(b.toString()) should hold.

Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()
Returns the hashCode of the String-representation of this ClassLabel.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

Release 0.4.0 (2011-09-20_1324)