CCAFFEINE  0.8.8
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
jcpp::Hashtable Class Reference
Inheritance diagram for jcpp::Hashtable:
Inheritance graph
[legend]
Collaboration diagram for jcpp::Hashtable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int size ()
boolean isEmpty ()
Enumerationkeys ()
Enumerationelements ()
boolean contains (Object *value)
boolean containsKey (Object *key)
char ** charKeysToArray (int &ka_length)
Objectget (Object *key)
Objectput (Object *key, Object *value)
Objectremove (Object *key)
void clear ()
Objectclone ()
char * toString ()
boolean containsValue (Object *o)

Protected Member Functions

void rehash (int &rehashError)

Private Member Functions

int calculateBucket (Object *key)

Private Attributes

HashBucket ** table
int table_length
float loadFactor
int numberOfKeys
int rehashLimit
Object ** okeys
Object ** oelements
int N
int ttmNm2
int twoNm1

Static Private Attributes

static const long magic

Member Function Documentation

must call delete on this pointer when you are done with it.

must call delete on this pointer when you are done with it.

char** jcpp::Hashtable::charKeysToArray ( int &  ka_length)

If you want this functionality, you must use a StringHash. returns a 0 length list.

Creates a shallow copy of this hashtable. The keys and values themselves are not cloned.

Returns:
a clone of the hashtable.
{ return 0; }

delete this string when you are done with it.


Member Data Documentation

const long jcpp::Hashtable::magic [static, private]

unlike kaffe's rather goofy hash table implementation, we're stealing ascends/tcls hash on pointer.

int jcpp::Hashtable::N [private]

shape factor of the table. must be even and <= 30

int jcpp::Hashtable::ttmNm2 [private]

32 - N - 2, shift used to move sig. bits to low bits.

int jcpp::Hashtable::twoNm1 [private]

2^N -1, mask of bits.


The documentation for this class was generated from the following file: