public class LiteralRule extends AbstractRule
Modifier and Type | Field and Description |
---|---|
protected DataType |
datatype |
protected java.lang.String |
format |
protected java.lang.String |
literal |
static java.lang.String |
ODS_DATE_FORMAT |
aoSession, engine
Constructor and Description |
---|
LiteralRule(RuleEngine engine,
AoSession aoSession)
Create an literal rule.
|
LiteralRule(RuleEngine engine,
AoSession aoSession,
java.util.Collection<LiteralRule> collection)
Create an literal rule and initialize the child list with the given collection elements.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
LiteralRule element)
Add a child rule.
|
DataType |
getDataType()
Get the literal string.
|
java.lang.String |
getFormat()
Get the format string.
|
java.lang.String |
getLiteral()
Get the literal string.
|
NameValueUnit |
getValue()
Get the named value from rule.
|
LiteralRule |
set(int index,
LiteralRule element)
Set the child at a specific index position.
|
void |
setDataType(DataType datatype)
Set the datatype of th literal.
|
void |
setFormat(java.lang.String format)
Set the format string.
|
void |
setLiteral(java.lang.String literal)
Set the literal string.
|
void |
setValue(NameValueUnit nvu)
Get the named value from rule.
|
add, executePostMethods, executePreMethods, get, getEngine, getId, getMessenger, getPointTo, getSession, getTransformer, isPedantic, remove, set, setId, setMethods, setMethods, setPedantic, setPointTo, size, toString
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
public static final java.lang.String ODS_DATE_FORMAT
protected DataType datatype
protected java.lang.String literal
protected java.lang.String format
public LiteralRule(RuleEngine engine, AoSession aoSession)
public LiteralRule(RuleEngine engine, AoSession aoSession, java.util.Collection<LiteralRule> collection)
collection
- the initial chil list.public void add(int index, LiteralRule element)
index
- The index of the new child.element
- the new child.public LiteralRule set(int index, LiteralRule element)
index
- the positionelement
- the childpublic void setFormat(java.lang.String format)
format
- the literalpublic java.lang.String getFormat()
public void setLiteral(java.lang.String literal)
literal
- the literalpublic java.lang.String getLiteral()
public void setDataType(DataType datatype)
datatype
- the datatypepublic DataType getDataType()
public void setValue(NameValueUnit nvu)
setValue
in class AbstractRule
nvu
- The name value of the rule.public NameValueUnit getValue()
getValue
in class AbstractRule