org.armedbear.lisp
Class HashTable

java.lang.Object
  extended by org.armedbear.lisp.LispObject
      extended by org.armedbear.lisp.HashTable
Direct Known Subclasses:
EqHashTable, EqlHashTable, EqualHashTable, EqualpHashTable

public abstract class HashTable
extends LispObject


Nested Class Summary
protected static class HashTable.HashEntry
           
 
Field Summary
protected  HashTable.HashEntry[] buckets
           
protected  int count
           
protected static float loadFactor
           
protected  LispObject rehashSize
           
protected  LispObject rehashThreshold
           
protected  int threshold
           
 
Constructor Summary
protected HashTable()
           
protected HashTable(int size, LispObject rehashSize, LispObject rehashThreshold)
           
 
Method Summary
protected static int calculateInitialCapacity(int size)
           
 LispObject classOf()
           
 void clear()
           
 LispObject ENTRIES()
           
 boolean equalp(LispObject obj)
           
abstract  LispObject get(LispObject key)
           
 int getCount()
           
 LispObject gethash(LispObject key)
           
 LispObject gethash(LispObject key, LispObject defaultValue)
           
 LispObject gethash1(LispObject key)
           
 LispObject getParts()
          Implementing the getParts() protocol will allow INSPECT to return information about the substructure of a descendent of LispObject.
 LispObject getRehashSize()
           
 LispObject getRehashThreshold()
           
 int getSize()
           
abstract  Symbol getTest()
           
 LispObject MAPHASH(LispObject function)
           
 int psxhash()
           
abstract  void put(LispObject key, LispObject value)
           
 LispObject puthash(LispObject key, LispObject newValue)
           
protected abstract  void rehash()
           
 LispObject remhash(LispObject key)
           
abstract  LispObject remove(LispObject key)
           
 LispObject typeOf()
           
 LispObject typep(LispObject type)
           
 java.lang.String writeToString()
           
 
Methods inherited from class org.armedbear.lisp.LispObject
ABS, add, add, aref_long, aref, AREF, AREF, aset, aset, aset, ash, ash, atom, ATOM, caddr, cadr, car, cddr, cdr, CHAR, characterp, CHARACTERP, chars, COMPLEXP, constantp, CONSTANTP, copyToArray, decr, DENOMINATOR, dispatch, divideBy, doubleValue, elt, endp, ENDP, EQ, eql, eql, eql, EQL, equal, equal, EQUAL, equalp, evenp, EVENP, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, floatp, FLOATP, floatValue, getBooleanValue, getCallCount, getDescription, getDocumentation, getFixnumSlotValue, getHotCount, getInstance, getPropertyList, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, getSlotValue, getSlotValueAsBoolean, getStringChars, getStringValue, getSymbolFunction, getSymbolFunctionOrDie, getSymbolSetfFunction, getSymbolSetfFunctionOrDie, getSymbolValue, incr, incrementCallCount, incrementHotCount, integerp, INTEGERP, intValue, IS_E, IS_GE, IS_GT, IS_LE, IS_LT, IS_NE, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNotEqualTo, isNotEqualTo, isSpecialOperator, isSpecialVariable, javaInstance, javaInstance, LDB, length, LENGTH, listp, LISTP, lockableInstance, LOGAND, LOGAND, LOGIOR, LOGIOR, LOGNOT, LOGXOR, LOGXOR, longValue, minusp, MINUSP, MOD, MOD, multiplyBy, multiplyBy, negate, noFillPointer, NOT, nreverse, NTH, NTH, nthcdr, numberp, NUMBERP, NUMERATOR, oddp, ODDP, plusp, PLUSP, psxhash, push, rationalp, RATIONALP, realp, REALP, resolve, reverse, RPLACA, RPLACD, SCHAR, setCallCount, setCar, setCdr, setDocumentation, setHotCount, setPropertyList, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, setSlotValue, setSlotValue, SIMPLE_STRING_P, SLOT_VALUE, STRING, stringp, STRINGP, subtract, subtract, SVREF, svset, sxhash, SYMBOLP, truncate, unreadableString, unreadableString, unreadableString, unreadableString, VECTOR_PUSH_EXTEND, VECTOR_PUSH_EXTEND, vectorp, VECTORP, vectorPushExtend, zerop, ZEROP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loadFactor

protected static final float loadFactor
See Also:
Constant Field Values

rehashSize

protected final LispObject rehashSize

rehashThreshold

protected final LispObject rehashThreshold

threshold

protected int threshold

buckets

protected HashTable.HashEntry[] buckets

count

protected int count
Constructor Detail

HashTable

protected HashTable()

HashTable

protected HashTable(int size,
                    LispObject rehashSize,
                    LispObject rehashThreshold)
Method Detail

calculateInitialCapacity

protected static int calculateInitialCapacity(int size)

getRehashSize

public final LispObject getRehashSize()

getRehashThreshold

public final LispObject getRehashThreshold()

getSize

public int getSize()

getCount

public int getCount()

getTest

public abstract Symbol getTest()

typeOf

public LispObject typeOf()
Overrides:
typeOf in class LispObject

classOf

public LispObject classOf()
Overrides:
classOf in class LispObject

typep

public LispObject typep(LispObject type)
Overrides:
typep in class LispObject

equalp

public boolean equalp(LispObject obj)
Overrides:
equalp in class LispObject

getParts

public LispObject getParts()
Description copied from class: LispObject
Implementing the getParts() protocol will allow INSPECT to return information about the substructure of a descendent of LispObject. The protocol is to return a List of Cons pairs, where the car of each pair contains a decriptive string, and the cdr returns a subobject for inspection.

Overrides:
getParts in class LispObject

clear

public void clear()

gethash

public LispObject gethash(LispObject key)

gethash

public LispObject gethash(LispObject key,
                          LispObject defaultValue)

gethash1

public LispObject gethash1(LispObject key)

puthash

public LispObject puthash(LispObject key,
                          LispObject newValue)

remhash

public LispObject remhash(LispObject key)

writeToString

public java.lang.String writeToString()
Overrides:
writeToString in class LispObject

get

public abstract LispObject get(LispObject key)

put

public abstract void put(LispObject key,
                         LispObject value)

remove

public abstract LispObject remove(LispObject key)

rehash

protected abstract void rehash()

ENTRIES

public LispObject ENTRIES()

MAPHASH

public LispObject MAPHASH(LispObject function)

psxhash

public int psxhash()
Overrides:
psxhash in class LispObject