@webref floatdict:method @brief Add to a value
(String key, float amount)
| 403 | * @brief Add to a value |
| 404 | */ |
| 405 | public void add(String key, float amount) { |
| 406 | int index = index(key); |
| 407 | if (index == -1) { |
| 408 | create(key, amount); |
| 409 | } else { |
| 410 | values[index] += amount; |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | |
| 415 | /** |