Class HashTable
java.lang.Object
org.armedbear.lisp.LispObject
org.armedbear.lisp.HashTable
- All Implemented Interfaces:
Hashtable, LispObject
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static classprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashTable.HashEntry[]protected intprotected static final floatprotected final LispObjectprotected final LispObjectprotected int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHashTable(HashTable.Comparator c, int size, LispObject rehashSize, LispObject rehashThreshold) -
Method Summary
Modifier and TypeMethodDescriptionprotected static intcalculateInitialCapacity(int size) classOf()voidclear()ENTRIES()booleanequalp(LispObject obj) get(LispObject key) intgetCount()protected HashTable.HashEntrygetEntry(LispObject key) gethash(LispObject key) gethash(LispObject key, LispObject defaultValue) gethash1(LispObject key) getParts()Implementing the getParts() protocol will allow INSPECT to return information about the substructure of a descendent of LispObject.final LispObjectfinal LispObjectintgetSize()getTest()MAPHASH(LispObject function) static HashTablenewEqHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) static HashTablenewEqlHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) static HashTablenewEqualHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) static LispObjectnewEqualpHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) intpsxhash()voidput(LispObject key, LispObject value) puthash(LispObject key, LispObject newValue) protected voidrehash()remhash(LispObject key) remove(LispObject key) typeOf()typep(LispObject type) Methods inherited from class LispObject
ABS, add, add, aref, AREF, AREF, aref_long, 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, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, 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, princToString, psxhash, push, rationalp, RATIONALP, realp, REALP, resolve, reverse, RPLACA, RPLACD, SCHAR, setCallCount, setCar, setCdr, setDocumentation, setHotCount, setPropertyList, setSlotValue, setSlotValue, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, SIMPLE_STRING_P, SLOT_VALUE, STRING, stringp, STRINGP, subtract, subtract, SVREF, svset, sxhash, SYMBOLP, truncate, unreadableString, unreadableString, VECTOR_PUSH_EXTEND, VECTOR_PUSH_EXTEND, vectorp, VECTORP, vectorPushExtend, zerop, ZEROP
-
Field Details
-
loadFactor
protected static final float loadFactor- See Also:
-
rehashSize
-
rehashThreshold
-
threshold
protected int threshold -
buckets
-
count
protected volatile int count
-
-
Constructor Details
-
HashTable
protected HashTable(HashTable.Comparator c, int size, LispObject rehashSize, LispObject rehashThreshold)
-
-
Method Details
-
calculateInitialCapacity
protected static int calculateInitialCapacity(int size) -
newEqHashTable
-
newEqlHashTable
public static HashTable newEqlHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) -
newEqualHashTable
public static HashTable newEqualHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) -
newEqualpHashTable
public static LispObject newEqualpHashTable(int size, LispObject rehashSize, LispObject rehashThreshold) -
getRehashSize
-
getRehashThreshold
-
getSize
public int getSize() -
getCount
public int getCount() -
typeOf
- Specified by:
typeOfin interfaceLispObject- Overrides:
typeOfin classLispObject
-
classOf
- Overrides:
classOfin classLispObject
-
typep
- Overrides:
typepin classLispObject
-
equalp
- Overrides:
equalpin classLispObject
-
getParts
Description copied from class:LispObjectImplementing 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:
getPartsin classLispObject
-
clear
public void clear() -
gethash
-
gethash
-
gethash1
-
puthash
-
remhash
-
printObject
- Overrides:
printObjectin classLispObject
-
getTest
-
getEntry
-
get
-
put
-
remove
-
rehash
protected void rehash() -
ENTRIES
-
getEntries
- Specified by:
getEntriesin interfaceHashtable
-
MAPHASH
-
psxhash
public int psxhash()- Overrides:
psxhashin classLispObject
-