addTo

fun addTo(key: Long, incrementValue: Int): Int

Adds incrementValue to any existing value for the given key or inserts incrementValue if key did not previously exist.

Return

Returns the current value associated with key (after changes).

Parameters

key

The key of the value to adjust.

incrementValue

The value to put or add to the existing value if key exists.