public class SimpleClassLabel extends ClassLabel
Modifier and Type | Class and Description |
---|---|
static class |
SimpleClassLabel.Factory
Factory class.
|
static class |
SimpleClassLabel.Serializer
Serialization class.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
label
Holds the String designating the label.
|
static ByteBufferSerializer<SimpleClassLabel> |
SERIALIZER
Serializer.
|
static SimpleTypeInformation<SimpleClassLabel> |
TYPE
Type information.
|
Constructor and Description |
---|
SimpleClassLabel(java.lang.String label)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ClassLabel o) |
boolean |
equals(java.lang.Object o)
Any ClassLabel should ensure a natural ordering that is consistent with
equals.
|
int |
hashCode()
Returns the hashCode of the String-representation of this ClassLabel.
|
java.lang.String |
toString()
Any ClassLabel requires a method to represent the label as a String.
|
public static final ByteBufferSerializer<SimpleClassLabel> SERIALIZER
public static final SimpleTypeInformation<SimpleClassLabel> TYPE
private java.lang.String label
public SimpleClassLabel(java.lang.String label)
label
- Labelpublic int compareTo(ClassLabel o)
public int hashCode()
ClassLabel
hashCode
in class ClassLabel
public boolean equals(java.lang.Object o)
ClassLabel
this.compareTo(o)==0
, then
this.equals(o)
should be true
.equals
in class ClassLabel
o
- an object to test for equality w.r.t. this ClassLabelthis==obj || this.compareTo(o)==0
, false
otherwisepublic java.lang.String toString()
ClassLabel
ClassLabel a.equals((ClassLabel) b)
, then also
a.toString().equals(b.toString())
should hold.
toString
in class ClassLabel
Copyright © 2019 ELKI Development Team. License information.