Create a new key/value pair or change the value of one. @webref intdict:method @brief Create a new key/value pair or change the value of one
(String key, int amount)
| 372 | * @brief Create a new key/value pair or change the value of one |
| 373 | */ |
| 374 | public void set(String key, int amount) { |
| 375 | int index = index(key); |
| 376 | if (index == -1) { |
| 377 | create(key, amount); |
| 378 | } else { |
| 379 | values[index] = amount; |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | |
| 384 | public void setIndex(int index, String key, int value) { |