|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SymbolTable<A>
| Method Summary | |
|---|---|
void |
add(java.lang.String name,
A value)
Adds a name with an associated value to the current symbol table.. |
void |
add(Symbol variable,
A value)
Adds a new variable to the current symbol table. |
A |
get(ISymbol variable)
Returns the value associated with the specified variable. |
A |
get(java.lang.String name)
Returns the value associated with the specified variable. |
java.util.Set<Symbol> |
getSymbols()
Returns all of symbols from the current scope. |
java.lang.String |
getVariablesAsString()
Returns just the variables of the scope. |
A |
set(java.lang.String name,
A value)
Sets a value associated with a name. |
A |
set(Symbol variable,
A value)
Changes the value associated with the specified variable. |
| Method Detail |
|---|
void add(Symbol variable,
A value)
variable - the new variable to add to the symbol table.value - the new value to associate with the new variable.
java.lang.IllegalStateException - when the variable is already declared in the current
symbol table.
void add(java.lang.String name,
A value)
add(Symbol, Object)A get(ISymbol variable)
null for an
undefined variable.
variable - the variable to search for.
null if the
variable isn't found.A get(java.lang.String name)
get(ISymbol)java.util.Set<Symbol> getSymbols()
A set(Symbol variable,
A value)
variable - the variable to search for.value - the new value for the variable.
A set(java.lang.String name,
A value)
set(Symbol, Object)java.lang.String getVariablesAsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||