Jatha Software

org.jatha.util
Class SymbolTable

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<String,LispValue>
          extended by org.jatha.util.SymbolTable
All Implemented Interfaces:
Serializable, Cloneable, Map<String,LispValue>, SortedMap<String,LispValue>

public class SymbolTable
extends TreeMap<String,LispValue>

This defines a hash table containing LispSymbol class elements. They are indexed by LispString class elements.

See Also:
Serialized Form

Field Summary
private  Jatha f_lisp
           
static float HASH_TABLE_DEFAULT_LOAD_FACTOR
           
static int HASH_TABLE_DEFAULT_SIZE
           
static long serialVersionUID
           
 
Constructor Summary
SymbolTable(Jatha lisp)
           
SymbolTable(Jatha lisp, int defaultSize)
           
SymbolTable(Jatha lisp, int initialSize, float loadFactor)
           
 
Method Summary
 LispValue get(LispString key)
           
 Iterator keys()
          Returns an Iterator across the symbols of the SymbolTable.
 LispValue put(LispString key, LispValue value)
           
 LispValue replace(LispString key, LispValue value)
           
 
Methods inherited from class java.util.TreeMap
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

HASH_TABLE_DEFAULT_SIZE

public static final int HASH_TABLE_DEFAULT_SIZE
See Also:
Constant Field Values

HASH_TABLE_DEFAULT_LOAD_FACTOR

public static final float HASH_TABLE_DEFAULT_LOAD_FACTOR
See Also:
Constant Field Values

f_lisp

private Jatha f_lisp
Constructor Detail

SymbolTable

public SymbolTable(Jatha lisp)

SymbolTable

public SymbolTable(Jatha lisp,
                   int defaultSize)

SymbolTable

public SymbolTable(Jatha lisp,
                   int initialSize,
                   float loadFactor)
Method Detail

put

public LispValue put(LispString key,
                     LispValue value)

get

public LispValue get(LispString key)

replace

public LispValue replace(LispString key,
                         LispValue value)

keys

public Iterator keys()
Returns an Iterator across the symbols of the SymbolTable. Each symbol is a string.


Jatha Software