public interface Memory
Modifier and Type | Method and Description |
---|---|
boolean |
containsVariable(java.lang.String name)
Checks if the specified variable is stored in this memory.
|
ru.ispras.fortress.expression.NodeValue |
getValue(java.lang.String name)
Returns a value of the specified variable.
|
java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> |
getValues()
Returns a values of all stored variables.
|
void |
reset()
Sets all variables of this memory to the same values as they had immediately after the memory
construction.
|
void |
setValue(java.lang.String name,
ru.ispras.fortress.expression.NodeValue value)
Sets a variable with the specified name to the specified value.
|
void |
setValues(java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> values)
Sets variables with the specified names to the specified values.
|
void setValue(java.lang.String name, ru.ispras.fortress.expression.NodeValue value)
name
- the name of the modified variablevalue
- the value to be setvoid setValues(java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> values)
values
- a map containing mappings between names and new values of variables to be
modifiedboolean containsVariable(java.lang.String name)
name
- a variable nametrue
if this memory contains a value of the specified variable. Otherwise
returns false
ru.ispras.fortress.expression.NodeValue getValue(java.lang.String name)
name
- a variable namejava.lang.IllegalArgumentException
- if the specified variable is not found in this memoryjava.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> getValues()
void reset()