TKEY
to TVAL
.
Public Member Functions | |
Iterator | begin () const |
Get an iterator pointing to the start of hash_map. | |
int32_t | bucket_count () const |
Returns the number of buckets used by the hash map. | |
void | clear () |
Erases all of the elements. | |
bool | contains (const TKEY &k) const |
Check if a given key k exists in the hash map. | |
int32_t | count (const SharedBasePtr &k) const |
Counts the number of elements whose key is k. | |
bool | empty () const |
true if the hash map's size is 0. | |
Iterator | end () const |
Get an iterator pointing to the end of hash_map. | |
int32_t | erase (const TKEY &k) |
Erases the element whose key is k. | |
Iterator | find (const TKEY &k) const |
Finds an element whose key is k. | |
HashMapT (const HashMapT &other) | |
Copy constructor. | |
HashMapT (int32_t n) | |
Creates an empty hash map with at least n buckets and hash function hasher<TKEY> and equal to function equal_to<TKEY>. | |
HashMapT () | |
Creates an empty hash map with hash function hasher<TKEY> and equal to function equal_to<TKEY>. | |
bool | insert (const TKEY &k, const TVAL &v) |
Inserts the <k, v> pair into the hash map, when k does not exist in the hash map. | |
int32_t | max_size () const |
Returns the largest possible size of the hash map. | |
HashMapT & | operator= (const HashMapT &other) |
Assignment operator. | |
TVAL | operator[] (const TKEY &k) |
Returns a copy of the object that is associated with a particular key. | |
void | resize (int32_t n) |
Increases the bucket count to at least n. | |
int32_t | size () const |
Returns the size of the hash map. | |
void | swap (HashMapT &other) |
Swaps the contents of two hash maps. | |
void | update (const TKEY &k, const TVAL &v) |
Updates a value whose key must exist. | |
~HashMapT () | |
Destructor: the destructor of m_map would do required stuff. |
gemfire::HashMapT< TKEY, TVAL >::HashMapT | ( | ) | [inline] |
Creates an empty hash map with hash function hasher<TKEY> and equal to function equal_to<TKEY>.
gemfire::HashMapT< TKEY, TVAL >::HashMapT | ( | int32_t | n | ) | [inline] |
Creates an empty hash map with at least n buckets and hash function hasher<TKEY> and equal to function equal_to<TKEY>.
gemfire::HashMapT< TKEY, TVAL >::HashMapT | ( | const HashMapT< TKEY, TVAL > & | other | ) | [inline] |
Copy constructor.
gemfire::HashMapT< TKEY, TVAL >::~HashMapT | ( | ) | [inline] |
Destructor: the destructor of m_map would do required stuff.
Iterator gemfire::HashMapT< TKEY, TVAL >::begin | ( | ) | const [inline] |
Get an iterator pointing to the start of hash_map.
int32_t gemfire::HashMapT< TKEY, TVAL >::bucket_count | ( | ) | const [inline] |
Returns the number of buckets used by the hash map.
void gemfire::HashMapT< TKEY, TVAL >::clear | ( | ) | [inline] |
Erases all of the elements.
bool gemfire::HashMapT< TKEY, TVAL >::contains | ( | const TKEY & | k | ) | const [inline] |
Check if a given key k exists in the hash map.
int32_t gemfire::HashMapT< TKEY, TVAL >::count | ( | const SharedBasePtr & | k | ) | const [inline] |
Counts the number of elements whose key is k.
bool gemfire::HashMapT< TKEY, TVAL >::empty | ( | ) | const [inline] |
true if the hash map's size is 0.
Iterator gemfire::HashMapT< TKEY, TVAL >::end | ( | ) | const [inline] |
Get an iterator pointing to the end of hash_map.
int32_t gemfire::HashMapT< TKEY, TVAL >::erase | ( | const TKEY & | k | ) | [inline] |
Erases the element whose key is k.
Iterator gemfire::HashMapT< TKEY, TVAL >::find | ( | const TKEY & | k | ) | const [inline] |
Finds an element whose key is k.
bool gemfire::HashMapT< TKEY, TVAL >::insert | ( | const TKEY & | k, | |
const TVAL & | v | |||
) | [inline] |
Inserts the <k, v> pair into the hash map, when k does not exist in the hash map.
int32_t gemfire::HashMapT< TKEY, TVAL >::max_size | ( | ) | const [inline] |
Returns the largest possible size of the hash map.
HashMapT& gemfire::HashMapT< TKEY, TVAL >::operator= | ( | const HashMapT< TKEY, TVAL > & | other | ) | [inline] |
Assignment operator.
TVAL gemfire::HashMapT< TKEY, TVAL >::operator[] | ( | const TKEY & | k | ) | [inline] |
Returns a copy of the object that is associated with a particular key.
void gemfire::HashMapT< TKEY, TVAL >::resize | ( | int32_t | n | ) | [inline] |
Increases the bucket count to at least n.
int32_t gemfire::HashMapT< TKEY, TVAL >::size | ( | ) | const [inline] |
Returns the size of the hash map.
void gemfire::HashMapT< TKEY, TVAL >::swap | ( | HashMapT< TKEY, TVAL > & | other | ) | [inline] |
Swaps the contents of two hash maps.
void gemfire::HashMapT< TKEY, TVAL >::update | ( | const TKEY & | k, | |
const TVAL & | v | |||
) | [inline] |
Updates a value whose key must exist.