Package edu.wisc.game.parser
Interface Expression.ArithmeticExpression
- All Superinterfaces:
Expression
- All Known Implementing Classes:
Expression.AdditiveExpression,Expression.BracketList,Expression.ComparisonExpression,Expression.Id,Expression.MultiplicativeExpression,Expression.NegationExpression,Expression.Num,Expression.QualifiedId,Expression.SerialExpression
- Enclosing interface:
- Expression
public static interface Expression.ArithmeticExpression extends Expression
An arithmetic expression is composed of variables, constants,
and arithmetic operations; parentheses can be used for
ordering operations. The value of the expression can be
computed for any given set of variable values (unless a division
by zero etc happens).
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.wisc.game.parser.Expression
Expression.AdditiveExpression, Expression.ArithmeticExpression, Expression.BracketList, Expression.ColonExpression, Expression.ComparisonExpression, Expression.ExList, Expression.Id, Expression.Mapper, Expression.MapTo<T>, Expression.MultiplicativeExpression, Expression.NegationExpression, Expression.Num, Expression.ParenList, Expression.PropMap, Expression.QualifiedId, Expression.RangeExpression, Expression.SerialExpression, Expression.Star, Expression.VarMap, Expression.VarMap2 -
Field Summary
-
Method Summary
-
Method Details
-
evalSet
Evaluates this expression for the given values of the variables involved. Can be used when the arguments can have multiple values.- Parameters:
h- The hash map that contains for each variable the possible set of its values.- Returns:
- the set of the possible values of the expression, or an empty set if the expression uses a variable whose value is not in h
-
evalSet2
-
listAllVars
-