getAndIncrement

Atomically increments the current value by one and returns the old value.

Since Kotlin

1.3