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

List of all members.

Public Member Functions

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

Protected Member Functions

void rehash (int &rehashError)

Private Member Functions

int calculateBucket (HashKey *key)

Private Attributes

GenericHashBucket ** table
int table_length
float loadFactor
int numberOfKeys
int rehashLimit
HashKey ** 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.

CFREE char** jcpp::GenericHashTable::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::GenericHashTable::magic [static, private]

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

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

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

2^N -1, mask of bits.


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