Class Bindings
- java.lang.Object
-
- at.jku.ssw.fp.sect04_4.visitor_fp.Bindings
-
public class Bindings extends Object
Variable bindings. Uses a map from variable name to Boolean value.- Author:
- Herbert Prähofer
-
-
Constructor Summary
Constructors Constructor Description Bindings()
Constructor creating an empty map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
get(String name)
Returns the Boolean value for the variable.void
set(String name, boolean value)
Sets the value for the variable
-
-
-
Method Detail
-
get
public boolean get(String name)
Returns the Boolean value for the variable. Returnsfalse
if variable does not exist.- Parameters:
name
- the variable name- Returns:
- the value;
false
if variable does not exist
-
set
public void set(String name, boolean value)
Sets the value for the variable- Parameters:
name
- the variable namevalue
- the value
-
-