|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSymbolTable
A simple table of symbols for a postscript interpreter. This particular implementation is very expensive, and we'll see improved implementations in the latter part of the semester.
Constructor Summary | |
SymbolTable()
Constructs an empty symbol table. |
Method Summary | |
void |
add(java.lang.String symbol,
Token value)
Adds a string-value association to the table. |
boolean |
contains(java.lang.String symbol)
Checks for an entry associated with a particular string. |
Token |
get(java.lang.String symbol)
Gets a value associated with a string, from the symbol table. |
static void |
main(java.lang.String[] args)
An example method that makes use of a symbol table. |
java.lang.String |
toString()
Removes a value associated with the a string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SymbolTable()
Method Detail |
public boolean contains(java.lang.String symbol)
symbol
- a string potentially associated with a value.
public void add(java.lang.String symbol, Token value)
symbol
- a non-null stringvalue
- a Token associated with a string.public Token get(java.lang.String symbol)
symbol
- the string whose value is sought
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |