Inheritance diagram for HashtableCore< T >:
Has no suppositions about templated object structure.
Public Member Functions | |
HashtableCore () | |
Default constructor. | |
HashtableCore (int capacity, double loadFactor=DEFAULT_LOAD_FACTOR) | |
Constructor with explicit hashtable size declaration. | |
virtual | ~HashtableCore () |
Default Destructor. | |
bool | put (const String *key, T value) |
Puts object into hashtable. | |
bool | remove (const String *key) |
Removes object from hashtable. | |
const String * | key (int index) const |
Enumerates hashtable keys. | |
String * | enumerateKey () const |
Starts internal hashtable enumeration procedure on keys. | |
String * | nextkey () const |
Returns the next key object with current enumeration procedure. | |
void | clear () |
Clears hashtable. | |
int | size () const |
Number of objects, currently stored in hashtable. | |
Protected Member Functions | |
T * | enumerate_int () const |
T * | next_int () const |
void | rehash () |
HashtableCore & | operator= (HashtableCore &) |
Protected Attributes | |
int | csize |
int | capacity |
double | loadFactor |
HashEntry< T > ** | bucket |
HashEntry< T > * | enum_he |
int | enum_bno |
|
Constructor with explicit hashtable size declaration.
|
|
Puts object into hashtable. If such a key already exists, object is replaced.
|
|
Removes object from hashtable.
If there is no record, associated with
|
|
Enumerates hashtable keys.
|
|
Starts internal hashtable enumeration procedure on keys.
|
|
Returns the next key object with current enumeration procedure. If hashtable state is changed, and nextkey() call occurs, exception is thrown. Note, that internal enumeration counter is one for keys and values methods - so, each of them iterates one sequence. |
|
Clears hashtable. Deletes all objects, stored in it. |