assertEquals(map.keySet().size(), 1); assertFalse(map.removeIfPresent("missing", "nope")); assertTrue(map.removeIfPresent("foo", "there"));
@Override public void removeIfPresent(K k, V v, Handler<AsyncResult<Boolean>> handler) { try { boolean present = local.removeIfPresent(k, v); handler.handle(Future.succeededFuture(present)); } catch (Exception e) { handler.handle(Future.failedFuture(e)); } }
@Override public void removeIfPresent(K k, V v, Handler<AsyncResult<Boolean>> handler) { try { boolean present = local.removeIfPresent(k, v); handler.handle(Future.succeededFuture(present)); } catch (Exception e) { handler.handle(Future.failedFuture(e)); } }
public static boolean removeIfPresent(io.vertx.core.shareddata.LocalMap<Object, Object> j_receiver, java.lang.Object key, java.lang.Object value) { return j_receiver.removeIfPresent(io.vertx.core.impl.ConversionHelper.toObject(key), io.vertx.core.impl.ConversionHelper.toObject(value)); } 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) {
/** * Remove the entry only if there is an entry with the specified key and value. * <p> * This method is the poyglot version of {@link io.vertx.rxjava.core.shareddata.LocalMap#remove}. * @param key the key * @param value the value * @return true if removed */ public boolean removeIfPresent(K key, V value) { boolean ret = delegate.removeIfPresent(__typeArg_0.<K>unwrap(key), __typeArg_1.<V>unwrap(value)); return ret; }
/** * Remove the entry only if there is an entry with the specified key and value. * <p> * This method is the poyglot version of {@link io.vertx.rxjava.core.shareddata.LocalMap#remove}. * @param key the key * @param value the value * @return true if removed */ public boolean removeIfPresent(K key, V value) { boolean ret = delegate.removeIfPresent(__typeArg_0.<K>unwrap(key), __typeArg_1.<V>unwrap(value)); return ret; }
assertEquals(map.keySet().size(), 1); assertFalse(map.removeIfPresent("missing", "nope")); assertTrue(map.removeIfPresent("foo", "there"));