assertFalse(map.replaceIfPresent("missing", "nope", "something")); assertTrue(map.replaceIfPresent("foo", "there", "something")); assertEquals(map.get("foo"), "something");
assertFalse(map.replaceIfPresent("missing", "nope", "something")); assertTrue(map.replaceIfPresent("foo", "there", "something")); assertEquals(map.get("foo"), "something");
public static boolean replaceIfPresent(io.vertx.core.shareddata.LocalMap<Object, Object> j_receiver, java.lang.Object key, java.lang.Object oldValue, java.lang.Object newValue) { return j_receiver.replaceIfPresent(io.vertx.core.impl.ConversionHelper.toObject(key), io.vertx.core.impl.ConversionHelper.toObject(oldValue), io.vertx.core.impl.ConversionHelper.toObject(newValue)); } public static java.lang.Object replace(io.vertx.core.shareddata.LocalMap<Object, Object> j_receiver, java.lang.Object key, java.lang.Object value) {
/** * Replace the entry only if there is an existing entry with the specified key and value. * <p> * This method is the polyglot version of {@link io.vertx.rxjava.core.shareddata.LocalMap#replace}. * @param key the key * @param oldValue the old value * @param newValue the new value * @return true if removed */ public boolean replaceIfPresent(K key, V oldValue, V newValue) { boolean ret = delegate.replaceIfPresent(__typeArg_0.<K>unwrap(key), __typeArg_1.<V>unwrap(oldValue), __typeArg_1.<V>unwrap(newValue)); return ret; }
/** * Replace the entry only if there is an existing entry with the specified key and value. * <p> * This method is the polyglot version of {@link io.vertx.rxjava.core.shareddata.LocalMap#replace}. * @param key the key * @param oldValue the old value * @param newValue the new value * @return true if removed */ public boolean replaceIfPresent(K key, V oldValue, V newValue) { boolean ret = delegate.replaceIfPresent(__typeArg_0.<K>unwrap(key), __typeArg_1.<V>unwrap(oldValue), __typeArg_1.<V>unwrap(newValue)); return ret; }