|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.ling.ValueLabel
edu.stanford.nlp.ling.StringLabel
public class StringLabel
A StringLabel object acts as a Label by containing a
single String, which it sets or returns in response to requests.
The hashCode() and compareTo() methods for this class assume that this
string value is non-null. equals() is correctly implemented
| Constructor Summary | |
|---|---|
StringLabel()
Create a new StringLabel with a null content (i.e., str). |
|
StringLabel(Label label)
Create a new StringLabel with the
value() of another label as its label. |
|
StringLabel(String str)
Create a new StringLabel with the given content. |
|
| Method Summary | |
|---|---|
static LabelFactory |
factory()
Return a factory for this kind of label. |
LabelFactory |
labelFactory()
Return a factory for this kind of label (i.e., StringLabel). |
void |
setFromString(String str)
Set the label from a String. |
void |
setValue(String value)
Set the value for the label. |
String |
value()
Return the word value of the label (or null if none). |
| Methods inherited from class edu.stanford.nlp.ling.ValueLabel |
|---|
compareTo, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringLabel()
StringLabel with a null content (i.e., str).
public StringLabel(String str)
StringLabel with the given content.
str - The new label's contentpublic StringLabel(Label label)
StringLabel with the
value() of another label as its label.
label - The other label| Method Detail |
|---|
public String value()
value in interface Labelvalue in class ValueLabelpublic void setValue(String value)
setValue in interface LabelsetValue in class ValueLabelvalue - The value for the labelpublic void setFromString(String str)
setFromString in interface LabelsetFromString in class ValueLabelstr - The str for the labelpublic LabelFactory labelFactory()
StringLabel).
The factory returned is always the same one (a singleton).
labelFactory in interface LabellabelFactory in class ValueLabelpublic static LabelFactory factory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||