public class StringElement extends NLGElement
This class defines an element for representing canned text within the SimpleNLG library. Once assigned a value, the string element should not be changed by any other processors.
features
Constructor and Description |
---|
StringElement(String value)
Constructs a new string element representing some canned text.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
An NLG element is equal to some object if the object is an NLGElement,
they have the same category and the same features.
|
List<NLGElement> |
getChildren()
The string element contains no children so this method will always return
an empty list.
|
String |
printTree(String indent) |
String |
toString()
|
clearAllFeatures, equals, getAllFeatureNames, getAllFeatures, getCategory, getFactory, getFeature, getFeatureAsBoolean,
getFeatureAsDouble,
getFeatureAsElement,
getFeatureAsElementList,
getFeatureAsFloat,
getFeatureAsInteger,
getFeatureAsList,
getFeatureAsLong,
getFeatureAsString,
getFeatureAsStringList,
getParent, getRealisation, getTense, hasFeature, isA,
isNegated, isPlural, removeFeature,
setCategory,
setFactory,
setFeature, setFeature,
setFeature, setFeature, setFeature,
setFeature,
setNegated, setParent,
setPlural, setRealisation,
setTense
public StringElement(String value)
value
- the text for this string element.public List<NLGElement> getChildren()
getChildren
in class NLGElement
List
of NLGElement
s representing the
children of this element.
public String toString()
toString
in
class NLGElement
public boolean equals(Object o)
NLGElement
equals
in
class NLGElement
public String printTree(String indent)
printTree
in
class NLGElement
Copyright © 2020. All Rights Reserved.