Class HashtableStack

java.lang.Object
  |
  +--HashtableStack
All Implemented Interfaces:
java.io.Serializable

public class HashtableStack
extends java.lang.Object
implements java.io.Serializable

The class `HashtableStack' represents a stack of hash tables. It is used for storing frame associations and variable bindings with a stack-based retraction mechanism.

See Also:
Serialized Form

Constructor Summary
HashtableStack()
          Constructs a new hash table stack with one hash table in it initially.
 
Method Summary
 java.lang.Object lookup(java.lang.Object key)
          Looks up the value with the given key across all of the hash tables in the stack.
 void pop()
          Pops the most recently pushed hash table off of the stack, causing all the associations in that hash table to be retracted.
 void push()
          Pushes a new hash table onto this stack.
 void store(java.lang.Object key, java.lang.Object value)
          Stores a given (key,value) pair in the hash table at the top of the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashtableStack

public HashtableStack()
Constructs a new hash table stack with one hash table in it initially.
Method Detail

push

public void push()
Pushes a new hash table onto this stack. All subsequent calls to store will put an object in this hash table until it is popped.

pop

public void pop()
Pops the most recently pushed hash table off of the stack, causing all the associations in that hash table to be retracted.

store

public void store(java.lang.Object key,
                  java.lang.Object value)
Stores a given (key,value) pair in the hash table at the top of the stack.

lookup

public java.lang.Object lookup(java.lang.Object key)
Looks up the value with the given key across all of the hash tables in the stack.