public class DefaultSymbolTable extends Object implements MutableSymbolTable
Constructor and Description |
---|
DefaultSymbolTable() |
DefaultSymbolTable(SymbolTable symbolTable) |
Modifier and Type | Method and Description |
---|---|
void |
addFunction(Function function) |
void |
addVar(String name,
Object value) |
boolean |
exists(String name) |
Function |
function(String name) |
SymbolTable |
getSymbolTable() |
Iterator<Function> |
iterator() |
Iterator<Function> |
iterfuncs() |
Iterator<String> |
itervars() |
void |
removeFunction(String name) |
void |
removeVar(String name) |
void |
setSymbolTable(SymbolTable symbolTable) |
Object |
value(String name) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultSymbolTable(SymbolTable symbolTable)
public DefaultSymbolTable()
public void addVar(String name, Object value)
addVar
in interface MutableSymbolTable
public void addFunction(Function function)
addFunction
in interface MutableSymbolTable
public Function function(String name)
function
in interface SymbolTable
public boolean exists(String name)
exists
in interface SymbolTable
public Object value(String name)
value
in interface SymbolTable
public void setSymbolTable(SymbolTable symbolTable)
setSymbolTable
in interface MutableSymbolTable
public SymbolTable getSymbolTable()
getSymbolTable
in interface MutableSymbolTable
public void removeVar(String name)
removeVar
in interface MutableSymbolTable
public void removeFunction(String name)
removeFunction
in interface MutableSymbolTable
public Iterator<String> itervars()
itervars
in interface SymbolTable
public Iterator<Function> iterfuncs()
iterfuncs
in interface SymbolTable