|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.data.ClassLabel<SimpleClassLabel>
de.lmu.ifi.dbs.elki.data.SimpleClassLabel
public class SimpleClassLabel
A simple class label casting a String as it is as label.
| Field Summary | |
|---|---|
private String |
label
Holds the String designating the label. |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug |
| Constructor Summary | |
|---|---|
SimpleClassLabel()
|
|
| Method Summary | |
|---|---|
int |
compareTo(SimpleClassLabel o)
The ordering of two SimpleClassLabels is given by the ordering on the Strings they represent. |
boolean |
equals(Object o)
Any ClassLabel should ensure a natural ordering that is consistent with equals. |
int |
hashCode()
The hash code of a simple class label is the hash code of the String represented by the ClassLabel. |
void |
init(String label)
Provides a simple class label covering the given String. |
String |
toString()
Returns a new instance of the String covered by this SimpleClassLabel. |
| Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String label
| Constructor Detail |
|---|
public SimpleClassLabel()
ClassLabel.ClassLabel()| Method Detail |
|---|
public void init(String label)
init in class ClassLabel<SimpleClassLabel>label - the String to be cast as labelClassLabel.init(String)public int compareTo(SimpleClassLabel o)
this.label.compareTo(o.label).
Comparable.compareTo(Object)public int hashCode()
hashCode in class ClassLabel<SimpleClassLabel>Object.hashCode()public boolean equals(Object o)
this.compareTo(o)==0, then
this.equals(o) should be true.
equals in class ClassLabel<SimpleClassLabel>o - an object to test for equality w.r.t. this ClassLabel
this==obj || this.compareTo(o)==0, false
otherwisepublic String toString()
toString in class ClassLabel<SimpleClassLabel>ClassLabel.toString()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||