putOrAdd

fun putOrAdd(key: Long, putValue: Float, incrementValue: Float): Float

If key exists, putValue is inserted into the map, otherwise any existing value is incremented by additionValue.

Return

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

Parameters

key

The key of the value to adjust.

putValue

The value to put if key does not exist.

incrementValue

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