Create a new key/value pair or change the value of one. @webref floatdict:method @webBrief Create a new key/value pair or change the value of one
(String key, float amount)
| 390 | * @webBrief Create a new key/value pair or change the value of one |
| 391 | */ |
| 392 | public void set(String key, float amount) { |
| 393 | int index = index(key); |
| 394 | if (index == -1) { |
| 395 | create(key, amount); |
| 396 | } else { |
| 397 | values[index] = amount; |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | |
| 402 | public void setIndex(int index, String key, float value) { |
no test coverage detected