CCAFFEINE
0.8.8
|
Public Member Functions | |
int | size () |
boolean | isEmpty () |
CDELETE Enumeration * | keys () |
CDELETE Enumeration * | elements () |
boolean | contains (Object *value) |
boolean | containsKey (HashKey *key) |
CFREE char ** | charKeysToArray (int &ka_length) |
Object * | get (HashKey *key) |
Object * | put (HashKey *key, Object *value) |
Object * | remove (HashKey *key) |
void | clear () |
HashKey * | clone () |
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 |
CDELETE Enumeration* jcpp::GenericHashTable::keys | ( | ) |
must call delete on this pointer when you are done with it.
CDELETE Enumeration* jcpp::GenericHashTable::elements | ( | ) |
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.
HashKey* jcpp::GenericHashTable::clone | ( | ) | [inline] |
Creates a shallow copy of this hashtable. The keys and values themselves are not cloned.
{ return 0; }
char* jcpp::GenericHashTable::toString | ( | ) |
delete this string when you are done with it.
const long jcpp::GenericHashTable::magic [static, private] |
unlike kaffe's rather goofy hash table implementation, we're stealing ascends/tcls hash on pointer.
int jcpp::GenericHashTable::N [private] |
shape factor of the table. must be even and <= 30
int jcpp::GenericHashTable::ttmNm2 [private] |
32 - N - 2, shift used to move sig. bits to low bits.
int jcpp::GenericHashTable::twoNm1 [private] |
2^N -1, mask of bits.