modhelxs.mocs.tfsm.parser
Class Expression
java.lang.Object
modhelxs.mocs.tfsm.parser.Expression
- Direct Known Subclasses:
- BinaryOperator, OperatorDelay, OperatorNot, Variable
public abstract class Expression
- extends java.lang.Object
Represents boolean expressions.
|
Field Summary |
(package private) boolean |
isValid
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isValid
boolean isValid
Expression
public Expression()
eval
public abstract Value eval(java.util.Map<java.lang.String,Value> in)
throws EvaluationException
- Throws:
EvaluationException
precedence
private static int precedence(char op)
pushVariable
private static void pushVariable(java.util.Stack<Expression> output,
java.lang.String var)
pushOperator
private static boolean pushOperator(java.util.Stack<Expression> output,
char op,
java.util.List<java.lang.String> listOfEvents)
throws java.text.ParseException
- Throws:
java.text.ParseException
isWhiteSpace
private static boolean isWhiteSpace(char c)
hasOnlyWhiteSpace
private static boolean hasOnlyWhiteSpace(java.lang.String s)
parse
public static boolean parse(java.lang.String s,
java.util.List<java.lang.String> listOfEvents)
throws java.text.ParseException
- Throws:
java.text.ParseException
setValid
public void setValid(boolean reponse)
getName
public java.lang.String getName()
getValid
public boolean getValid()
getDelayGard
public static java.lang.String getDelayGard(java.lang.String gard)