org.stanwood.media.source.xbmc.expression
Class ExpressionEval

java.lang.Object
  extended by org.stanwood.media.source.xbmc.expression.ExpressionEval

public class ExpressionEval
extends java.lang.Object

This class is used to evaluate expressions


Constructor Summary
ExpressionEval()
           
 
Method Summary
 Value eval(java.lang.String expression)
          Used to evaluate an expression
 java.util.Map<java.lang.String,Value> getVariables()
          Used to get the variables which can be used by expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionEval

public ExpressionEval()
Method Detail

getVariables

public java.util.Map<java.lang.String,Value> getVariables()
Used to get the variables which can be used by expressions. This method can be used to add new variables

Returns:
A map of variables.

eval

public Value eval(java.lang.String expression)
           throws ExpressionParserException
Used to evaluate an expression

Parameters:
expression - The expression
Returns:
The value it evaluates to
Throws:
ExpressionParserException - Thrown if their are any problems