/** * Remove a value from the map, only if entry already exists with same value. * @param k the key * @param v the value * @return * @deprecated use {@link #rxRemoveIfPresent} instead */ @Deprecated() public Observable<Boolean> removeIfPresentObservable(K k, V v) { io.vertx.rx.java.ObservableFuture<Boolean> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); removeIfPresent(k, v, resultHandler.toHandler()); return resultHandler; }
/** * Remove a value from the map, only if entry already exists with same value. * @param k the key * @param v the value * @return */ public Single<Boolean> rxRemoveIfPresent(K k, V v) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { removeIfPresent(k, v, fut); })); }
/** * Remove a value from the map, only if entry already exists with same value. * @param k the key * @param v the value * @return */ public Single<Boolean> rxRemoveIfPresent(K k, V v) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { removeIfPresent(k, v, fut); })); }