|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.shiwa.fgi.iwir.ConditionExpression
public class ConditionExpression
The Class ConditionExpression represents a condition. Contains the string and
the node representation.
A ConditionExpression can either be parsed from a condition string e.g.
new ConditionExpression(in = 2); or build using methods provided by
the Utility class ConditionAST
e.g.
ConditionNode n = ConditionAST.createEqOp(ConditionAST.createPortNode("in"), ConditionAST.createIntNode(3)); new ConditionExpression(n);
Conditions can be evaluated setting the values directly for the input ports
using the setValue() methods. The evaluation can then be invoked
using either the ConditionAST
class or by the eval() methods
of this class.
For additional information see ConditionNode
and ConditionAST
.
Constructor Summary | |
---|---|
ConditionExpression(ConditionNode node)
Instantiates a new condition expression. |
|
ConditionExpression(java.lang.String condition)
Instantiates a new condition expression. |
Method Summary | |
---|---|
boolean |
eval()
Evaluates the condition of a task, if the values are set using the setValue() operations. |
ConditionNode |
getConditionAsNode()
Gets the condition as ConditionNode representation. |
java.lang.String |
getConditionAsString()
Gets the condition as string representation. |
java.lang.String |
toString()
Gets the condition as string representation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConditionExpression(java.lang.String condition) throws ConditionParseException
condition
- the condition
ConditionParseException
public ConditionExpression(ConditionNode node)
node
- the nodeMethod Detail |
---|
public java.lang.String getConditionAsString()
public ConditionNode getConditionAsNode()
public boolean eval() throws java.lang.NullPointerException
ConditionAST.evalAST(ConditionNode, Map)
for more information.
The task is set internally, when setting the conditions.
java.lang.NullPointerException
- if the task is not setpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |