Package org.openlca.expressions
Class Scope
java.lang.Object
org.openlca.expressions.Scope
A scope contains bindings of variable names to expressions. Each scope has a
reference to a parent scope except of the global scope. An expression can be
evaluated in a scope.
-
Method Summary
Modifier and TypeMethodDescriptionvoidBinds the given variable to the given value in this scope.voidBinds the given variable to the given expression in this scope.voidclear()Removes all variable bindings from the scope.doubleEvaluates the given expression in this scope.resolveVariable(String name)
-
Method Details
-
bind
Binds the given variable to the given value in this scope. -
bind
Binds the given variable to the given expression in this scope. -
clear
public void clear()Removes all variable bindings from the scope. -
eval
Evaluates the given expression in this scope.- Throws:
InterpreterException
-
resolveVariable
- Throws:
InterpreterException
-