- /** Check whether the table contains a value for the given key. */
- bool contains(_Key key) {
- struct hashlistnode<_Key,_Val> *search;
+ /**
+ * @brief Check whether the table contains a value for the given key
+ * @param key The key for finding the value; must not be 0 or NULL
+ * @return True, if the key is found; false otherwise
+ */
+ bool contains(_Key key) const {
+ struct hashlistnode<_Key, _Val> *search;
+
+ /* HashTable cannot handle 0 as a key */
+ ASSERT(key);