|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Expression
This interface is definition how to handle all expressions. Every expression must implement this interface.
| Field Summary | |
|---|---|
static java.lang.String |
DISPLAY_NAME
Display name of this interface. |
| Fields inherited from interface org.qtitools.qti.node.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Method Summary | |
|---|---|
Value |
evaluate()
Evaluates this expression. |
BaseType |
getBaseType()
Gets baseType of evaluated result. |
Cardinality |
getCardinality()
Gets cardinality of evaluated result. |
java.util.List<Expression> |
getChildren()
Gets all children of this expression. |
ExpressionParent |
getParent()
Gets parent of this expression. |
BaseType[] |
getProducedBaseTypes()
Gets list of all possible produced baseTypes after evaluation (possible baseTypes of evaluated result). |
Cardinality[] |
getProducedCardinalities()
Gets list of all possible produced cardinalities after evaluation (possible cardinalities of evaluated result). |
ExpressionType |
getType()
Gets expression type of this expression. |
Value |
getValue()
Gets evaluated result or null if this expression is not evaluated yet. |
boolean |
isNull()
Returns true if evaluated result of this expression is NULL; false otherwise. |
boolean |
isVariable()
Returns true if value of evaluation can change every evaluation call; false otherwise. |
void |
reset()
Resets this expression and all its children state (set same state like before first evaluation). |
| Methods inherited from interface org.qtitools.qti.node.expression.ExpressionParent |
|---|
getRequiredBaseTypes, getRequiredCardinalities |
| Methods inherited from interface org.qtitools.qti.node.XmlObject |
|---|
getParentItem, getParentResult, getParentTest, setParent |
| Methods inherited from interface org.qtitools.qti.node.XmlNode |
|---|
getAttributes, getClassTag, getFullName, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString |
| Methods inherited from interface org.qtitools.qti.validation.Validatable |
|---|
validate |
| Field Detail |
|---|
static final java.lang.String DISPLAY_NAME
| Method Detail |
|---|
ExpressionParent getParent()
getParent in interface XmlNodegetParent in interface XmlObjectExpressionType getType()
boolean isVariable()
Cardinality[] getProducedCardinalities()
Static example is expression or. Expression or can produce only single cardinality and it cannot change.
Dynamic example is expression variable. Expression variable can produce any cardinality before evaluation. After evaluation it produces cardinality of its result (and it can change every evaluation call!).
Null expression, empty containers (multiple, ordered, record), or NULL values produces all cardinalities. So they are compatible with anything.
BaseType[] getProducedBaseTypes()
Static example is expression or. Expression or can produce only boolean baseType and it cannot change.
Dynamic example is expression variable. Expression variable can produce any baseType before evaluation. After evaluation it produces baseType of its result (and it can change every evaluation call!).
Null expression, empty containers (multiple, ordered, record), or NULL values produces all baseTypes. So they are compatible with anything.
java.util.List<Expression> getChildren()
void reset()
Value evaluate()
evaluate method for every subexpression)
validate method)
evaluateSelf method)
boolean isNull()
throws java.lang.NullPointerException
java.lang.NullPointerException - if this expression is not evaluated yet
Cardinality getCardinality()
throws java.lang.NullPointerException
java.lang.NullPointerException - if this expression is not evaluated yet
BaseType getBaseType()
throws java.lang.NullPointerException
java.lang.NullPointerException - if this expression is not evaluated yetValue getValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||