org.mapdb / Atomic / Var / getAndSet

getAndSet

fun getAndSet(newValue: E): E

Atomically sets to the given value and returns the previous value.

Parameters

newValue - the new value

Return
the previous value