|
Jatha Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 LispValuebasic_atom in class StandardLispValuepublic void internal_princ(PrintStream os)
internal_princ in interface LispValueinternal_princ in class StandardLispValuepublic void internal_prin1(PrintStream os)
internal_prin1 in interface LispValueinternal_prin1 in class StandardLispValuepublic void internal_print(PrintStream os)
internal_print in interface LispValueinternal_print in class StandardLispValuepublic Object toJava()
toJava in interface LispValuetoJava in class StandardLispValuepublic void assign(StandardLispHashTable value)
public Collection toCollection()
toCollection in interface LispValuetoCollection in class StandardLispValuepublic LispValue clrhash()
LispValue
clrhash in interface LispValueclrhash in class StandardLispValuepublic LispValue gethash(LispValue key)
LispValue
gethash in interface LispValuegethash in class StandardLispValue
public LispValue gethash(LispValue key,
LispValue defawlt)
LispValue
gethash in interface LispValuegethash in class StandardLispValuepublic LispValue remhash(LispValue key)
LispValue
remhash in interface LispValueremhash in class StandardLispValue
public LispValue setf_gethash(LispValue key,
LispValue value)
LispValue
setf_gethash in interface LispValuesetf_gethash in class StandardLispValuepublic LispValue hashtablep()
LispValue
hashtablep in interface LispValuehashtablep in class StandardLispValuepublic LispValue hash_table_count()
LispValue
hash_table_count in interface LispValuehash_table_count in class StandardLispValuepublic LispValue hash_table_size()
hash_table_size in interface LispValuehash_table_size in class StandardLispValuepublic LispValue hash_table_rehash_size()
hash_table_rehash_size in interface LispValuehash_table_rehash_size in class StandardLispValuepublic LispValue hash_table_rehash_threshold()
hash_table_rehash_threshold in interface LispValuehash_table_rehash_threshold in class StandardLispValuepublic LispValue hash_table_test()
LispValue
hash_table_test in interface LispValuehash_table_test in class StandardLispValuepublic LispValue type_of()
type_of in interface LispValuetype_of in class StandardLispValuepublic LispValue typep(LispValue type)
typep in interface LispValuetypep in class StandardLispValue
|
Jatha Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||