lij.runtime
Class SymbolTable

java.lang.Object
  extended by lij.runtime.SymbolTable

public class SymbolTable
extends java.lang.Object

A SymbolTable instance is used by objects of the ClauseInstance class, for storing mappings between variable names and variable values.

Author:
Nikolaos Chatzinikolaou

Field Summary
private  java.util.HashMap<java.lang.String,java.io.Serializable> table
           
 
Constructor Summary
SymbolTable()
           
 
Method Summary
 java.io.Serializable get(ArgumentVariable variable)
          Retrieves the value of the specified variable from the SymbolTable.
 void put(ArgumentVariable variable, java.io.Serializable value)
          Stores the specified variable and its associated value into the SymbolTable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

private java.util.HashMap<java.lang.String,java.io.Serializable> table
Constructor Detail

SymbolTable

public SymbolTable()
Method Detail

put

public void put(ArgumentVariable variable,
                java.io.Serializable value)
Stores the specified variable and its associated value into the SymbolTable.

Parameters:
variable - The variable.
value - The value.

get

public java.io.Serializable get(ArgumentVariable variable)
Retrieves the value of the specified variable from the SymbolTable. If a variable with the specified name does not exist, it is created with a null value.

Parameters:
variable - The variable.
Returns:
The value associated with the variable.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object