* @brief Remove a key from this map * @param key The key identifying the entry to remove * @retval bool true if the value was found and removed */
| 261 | * @retval bool true if the value was found and removed |
| 262 | */ |
| 263 | bool remove(const K& key) |
| 264 | { |
| 265 | int index = indexOf(key); |
| 266 | if(index < 0) { |
| 267 | return false; |
| 268 | } |
| 269 | removeAt(index); |
| 270 | return true; |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * @brief Get the value for a given key and remove it from the map, without destroying it |