Lines Matching refs:key
32 virtual void operator()(EntryKey& key, EntryValue& value) = 0;
38 key(e.key), value(e.value),
40 Entry(const EntryKey& key, const EntryValue& value) :
41 key(key), value(value) { }
43 EntryKey key;
69 bool contains(const K& key) const;
73 const V& get(const K& key);
74 bool put(const K& key, const V& value);
77 bool remove(const K& key);
125 (*mListener)(entry->key, entry->value);
135 bool GenerationCache<K, V>::contains(const K& key) const {
136 return mCache.indexOfKey(key) >= 0;
150 const V& GenerationCache<K, V>::get(const K& key) {
151 ssize_t index = mCache.indexOfKey(key);
163 bool GenerationCache<K, V>::put(const K& key, const V& value) {
168 ssize_t index = mCache.indexOfKey(key);
170 sp<Entry<K, V> > entry = new Entry<K, V>(key, value);
171 mCache.add(key, entry);
180 bool GenerationCache<K, V>::remove(const K& key) {
181 ssize_t index = mCache.indexOfKey(key);
194 (*mListener)(entry->key, entry->value);
203 ssize_t index = mCache.indexOfKey(mOldest->key);
209 "with the given key, but we know it must be in there. "
210 "Is the key comparator kaput?");