MCPcopy Index your code
hub / github.com/benfry/processing4 / add

Method add

core/src/processing/data/IntDict.java:449–456  ·  view source on GitHub ↗

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

(String key, int amount)

Source from the content-addressed store, hash-verified

447 * @webBrief Add to a value
448 */
449 public void add(String key, int amount) {
450 int index = index(key);
451 if (index == -1) {
452 create(key, amount);
453 } else {
454 values[index] += amount;
455 }
456 }
457
458
459 /**

Callers 2

incrementMethod · 0.95
subMethod · 0.95

Calls 2

indexMethod · 0.95
createMethod · 0.95

Tested by

no test coverage detected