vertx / io.vertx.reactivex.core.shareddata / LocalMap / replaceIfPresent

# replaceIfPresent

`open fun replaceIfPresent(key: K, oldValue: V, newValue: V): Boolean`

Replace the entry only if there is an existing entry with the specified key and value.

This method is the polyglot version of `io.vertx.reactivex.core.shareddata.LocalMap#replace`.

### Parameters

`key` - the key

`oldValue` - the old value

`newValue` - the new value

Return
true if removed