public class Bindings extends Object
Modifier and Type | Field | Description |
---|---|---|
static Bindings |
NOBINDINGS |
A predefined empty set of bindings; use this instead of null when you do
not want to bind any name.
|
Constructor | Description |
---|---|
Bindings() |
Initializes an empty set of bindings.
|
Modifier and Type | Method | Description |
---|---|---|
Value |
get(String name) |
Retrieves a value.
|
boolean |
isBound(String name) |
Tells if a given variable is bound to a value or not.
|
Map<String,Value> |
mapValues() |
Retrieves all the name/value mappings.
|
void |
set(String name,
Value value) |
Assigns a value to a variable.
|
void |
unset(String name) |
Destroys a variable.
|
public static final Bindings NOBINDINGS
public void set(String name, Value value)
name
- The name of the variable to set.value
- The new value.public Value get(String name)
name
- The name of the variable whose value must be retrieved.public void unset(String name)
name
- The name of the variable to be destroyed.public boolean isBound(String name)
name
- The name of the variable to be tested.Copyright © 2018 STLAB. All rights reserved.