public class DefaultSemanticLabel extends java.lang.Object implements SemanticLabel, java.lang.Comparable<DefaultSemanticLabel>, java.io.Serializable
Constructor and Description |
---|
DefaultSemanticLabel(java.lang.String label)
Creates a new DefaultSemanticLabel.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DefaultSemanticLabel other)
Takes a label and compares that label to this one.
|
boolean |
equals(DefaultSemanticLabel other)
Determines is this DefaultSemanticLabel is equal to the given one.
|
boolean |
equals(java.lang.Object other)
Determines if this label is equal to a given object.
|
java.lang.String |
getLabel()
Getter for label.
|
java.lang.String |
getName()
Gets the name of the label, which is its String.
|
int |
hashCode()
Computes the hash-code for the label, which is just the hash-code for
its String.
|
java.lang.String |
toString()
The name of the label.
|
public DefaultSemanticLabel(java.lang.String label)
label
- The String for the label.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
getName
in interface SemanticLabel
public int hashCode()
hashCode
in interface SemanticLabel
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in interface SemanticLabel
equals
in class java.lang.Object
other
- The object to compare topublic boolean equals(DefaultSemanticLabel other)
other
- The other DefaultSemanticLabel to compare topublic int compareTo(DefaultSemanticLabel other)
compareTo
in interface java.lang.Comparable<DefaultSemanticLabel>
other
- The label to compare with.public java.lang.String getLabel()