|
Jatha Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jatha.dynatype.StandardLispValue org.jatha.dynatype.StandardLispHashTable
public class StandardLispHashTable
Implements the Common LISP 'hashtable' type, including all four types: eq, eql, equal, and equalp has tables. The functions gethash, remhash, and setf-gethash are used to perform operatios on hash tables.
LispValue
Field Summary | |
---|---|
(package private) LispReal |
DEFAULT_REHASH_SIZE
Default rehash size is 1.2. |
(package private) LispReal |
DEFAULT_REHASH_THRESHOLD
Default rehash threshold is 640777/999999. |
(package private) LispInteger |
DEFAULT_SIZE
Default size is 103. |
(package private) LispValue |
DEFAULT_TYPE
Default to an EQL hash table. |
(package private) LispValue |
EQ
Use this value to create an EQ hash table. |
(package private) LispValue |
EQL
Use this value to create an EQL hash table. |
(package private) LispValue |
EQUAL
Use this value to create an EQUAL hash table. |
(package private) LispValue |
EQUALP
Use this value to create an EQUALP hash table. |
protected LispValue |
rehashSize
|
protected LispValue |
rehashThreshold
|
protected LispValue |
size
|
protected HashMap |
theHashTable
The actual hash table. |
protected LispValue |
type
|
Fields inherited from class org.jatha.dynatype.StandardLispValue |
---|
f_lisp |
Constructor Summary | |
---|---|
StandardLispHashTable()
|
|
StandardLispHashTable(Jatha lisp)
Creates an eql hash table with default sizes and rehash thresholds. |
|
StandardLispHashTable(Jatha lisp,
LispValue typeArg,
LispValue sizeArg,
LispValue rehashSizeArg,
LispValue rehashThresholdArg)
Send in the test type, size, rehash-size, and rehash-threshold or NIL for any of the parameters. |
|
StandardLispHashTable(StandardLispHashTable input)
|
Method Summary | |
---|---|
void |
assign(StandardLispHashTable value)
|
boolean |
basic_atom()
Returns Java true if the object is an atom. |
LispValue |
clrhash()
Clears a hash table. |
LispValue |
gethash(LispValue key)
Retrieves values from a hash table. |
LispValue |
gethash(LispValue key,
LispValue defawlt)
Retrieves values from a hash table, returning a default value if the key is not in the table. |
LispValue |
hash_table_count()
Returns the number of items in the hash table. |
LispValue |
hash_table_rehash_size()
This should return the rehash-threshold, but Java 1.1 doesn't let us access that number. |
LispValue |
hash_table_rehash_threshold()
Java 1.1 doesn't let us access this number. |
LispValue |
hash_table_size()
This should return the number of possible entries until the table is full, but Java 1.1 doesn't give us access to that number. |
LispValue |
hash_table_test()
Returns the function used when comparing keys in the hash table. |
LispValue |
hashtablep()
Returns T if the object is a floating-point number. |
void |
initializeConstants()
|
void |
internal_prin1(PrintStream os)
|
void |
internal_princ(PrintStream os)
|
void |
internal_print(PrintStream os)
|
LispValue |
remhash(LispValue key)
Removes an element from a hash table. |
LispValue |
setf_gethash(LispValue key,
LispValue value)
Sets a value in a hash table. |
Collection |
toCollection()
Returns the Hash Table as a Collection. |
Object |
toJava()
Returns a Java HashMap containing the contents of this HashTable. |
LispValue |
type_of()
|
LispValue |
typep(LispValue type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
LispValue EQ
LispValue EQL
LispValue EQUAL
LispValue EQUALP
LispValue DEFAULT_TYPE
LispInteger DEFAULT_SIZE
LispReal DEFAULT_REHASH_SIZE
LispReal DEFAULT_REHASH_THRESHOLD
protected LispValue type
protected LispValue size
protected LispValue rehashSize
protected LispValue rehashThreshold
protected HashMap theHashTable
HashMap
Constructor Detail |
---|
public StandardLispHashTable()
public StandardLispHashTable(Jatha lisp)
public StandardLispHashTable(StandardLispHashTable input)
public StandardLispHashTable(Jatha lisp, LispValue typeArg, LispValue sizeArg, LispValue rehashSizeArg, LispValue rehashThresholdArg)
Method Detail |
---|
public void initializeConstants()
public boolean basic_atom()
LispValue
basic_atom
in interface LispValue
basic_atom
in class StandardLispValue
public void internal_princ(PrintStream os)
internal_princ
in interface LispValue
internal_princ
in class StandardLispValue
public void internal_prin1(PrintStream os)
internal_prin1
in interface LispValue
internal_prin1
in class StandardLispValue
public void internal_print(PrintStream os)
internal_print
in interface LispValue
internal_print
in class StandardLispValue
public Object toJava()
toJava
in interface LispValue
toJava
in class StandardLispValue
public void assign(StandardLispHashTable value)
public Collection toCollection()
toCollection
in interface LispValue
toCollection
in class StandardLispValue
public LispValue clrhash()
LispValue
clrhash
in interface LispValue
clrhash
in class StandardLispValue
public LispValue gethash(LispValue key)
LispValue
gethash
in interface LispValue
gethash
in class StandardLispValue
public LispValue gethash(LispValue key, LispValue defawlt)
LispValue
gethash
in interface LispValue
gethash
in class StandardLispValue
public LispValue remhash(LispValue key)
LispValue
remhash
in interface LispValue
remhash
in class StandardLispValue
public LispValue setf_gethash(LispValue key, LispValue value)
LispValue
setf_gethash
in interface LispValue
setf_gethash
in class StandardLispValue
public LispValue hashtablep()
LispValue
hashtablep
in interface LispValue
hashtablep
in class StandardLispValue
public LispValue hash_table_count()
LispValue
hash_table_count
in interface LispValue
hash_table_count
in class StandardLispValue
public LispValue hash_table_size()
hash_table_size
in interface LispValue
hash_table_size
in class StandardLispValue
public LispValue hash_table_rehash_size()
hash_table_rehash_size
in interface LispValue
hash_table_rehash_size
in class StandardLispValue
public LispValue hash_table_rehash_threshold()
hash_table_rehash_threshold
in interface LispValue
hash_table_rehash_threshold
in class StandardLispValue
public LispValue hash_table_test()
LispValue
hash_table_test
in interface LispValue
hash_table_test
in class StandardLispValue
public LispValue type_of()
type_of
in interface LispValue
type_of
in class StandardLispValue
public LispValue typep(LispValue type)
typep
in interface LispValue
typep
in class StandardLispValue
|
Jatha Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |