* @brief Find the value for a given key, if it exists * @param key * @retval V* Points to the object if it exists, otherwise nullptr * @note If you need to modify the existing map entry, use `operator[]` or `valueAt()` */
| 221 | * @note If you need to modify the existing map entry, use `operator[]` or `valueAt()` |
| 222 | */ |
| 223 | V* find(const K& key) const |
| 224 | { |
| 225 | int index = entries.indexOf(key); |
| 226 | return (index < 0) ? nullptr : entries[index].value.get(); |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * @brief Get the index of a key |