/** @brief Return random key from set. */
_Key getRandomElement() {
- if (getSize() == 0)
+ if (size() == 0)
return NULL;
- else if (getSize() < 6) {
- uint count = random() % getSize();
+ else if (size() < 6) {
+ uint count = random() % size();
Linknode<_Key> *ptr = list;
while (count > 0) {
ptr = ptr->next;
return true;
}
- unsigned int getSize() const {
+ unsigned int size() const {
return table->getSize();
}
bool isEmpty() const {
- return getSize() == 0;
+ return size() == 0;
}
SetIterator<_Key, _KeyInt, _Shift, hash_function, equals> *iterator() {