Lines Matching defs:key

64   // If an entry with matching key is found, returns that entry.
66 Entry* Lookup(const Key& key, uint32_t hash) const;
68 // If an entry with matching key is found, returns that entry.
70 // corresponding key, key hash, and default initialized value.
71 Entry* LookupOrInsert(const Key& key, uint32_t hash);
73 // If an entry with matching key is found, returns that entry.
75 // corresponding key, key hash, and value created by func.
77 Entry* LookupOrInsert(const Key& key, uint32_t hash, const Func& value_func);
80 // different lookup key type than the hashmap's key type.
85 // If an entry with matching key is found, returns that entry.
87 // a key created by key_func, key hash, and value created by
93 Entry* InsertNew(const Key& key, uint32_t hash);
95 // Removes the entry with matching key.
97 // or null if there is no value for such key.
98 Value Remove(const Key& key, uint32_t hash);
137 Entry* Probe(const LookupKey& key, uint32_t hash) const;
138 Entry* FillEmptyEntry(Entry* entry, const Key& key, const Value& value,
215 const Key& key, uint32_t hash) const {
216 Entry* entry = Probe(key, hash);
224 const Key& key, uint32_t hash) {
225 return LookupOrInsert(key, hash, []() { return Value(); });
233 const Key& key, uint32_t hash, const Func& value_func) {
235 key, hash, [&key]() { return key; }, value_func);
258 const Key& key, uint32_t hash) {
259 Entry* entry = Probe(key, hash);
260 return FillEmptyEntry(entry, key, Value(), hash);
266 const Key& key, uint32_t hash) {
267 // Lookup the entry for the key to remove.
268 Entry* p = Probe(key, hash);
362 const LookupKey& key, uint32_t hash) const {
370 !impl_.match()(hash, map[i].hash, key, map[i].key)) {
381 Entry* entry, const Key& key, const Value& value, uint32_t hash) {
384 new (entry) Entry(key, value, hash);
390 entry = Probe(key, hash);
423 Entry* new_entry = Probe(entry->key, entry->hash);
425 FillEmptyEntry(new_entry, entry->key, entry->value, entry->hash);
435 // expensive) key comparison.
449 // Hashmap<void*, void*> which takes a custom key comparison function pointer.
492 // Hashmap<void*, void*> which compares the key pointers directly.
567 Iterator find(Key* key, bool insert = false) {
569 return Iterator(this, this->LookupOrInsert(key, key->Hash()));
571 return Iterator(this, this->Lookup(key, key->Hash()));