MCPcopy Create free account
hub / github.com/benfry/processing4 / add

Method add

core/src/processing/data/FloatDict.java:429–436  ·  view source on GitHub ↗

Add to a value. If the key does not exist, a new pair is initialized with the value supplied. @webref floatdict:method @webBrief Add to a value

(String key, float amount)

Source from the content-addressed store, hash-verified

427 * @webBrief Add to a value
428 */
429 public void add(String key, float amount) {
430 int index = index(key);
431 if (index == -1) {
432 create(key, amount);
433 } else {
434 values[index] += amount;
435 }
436 }
437
438
439 /**

Callers 1

subMethod · 0.95

Calls 2

indexMethod · 0.95
createMethod · 0.95

Tested by

no test coverage detected