Package org.jsignal.rx
Class RxUtil
java.lang.Object
org.jsignal.rx.RxUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createIndexed
(Supplier<? extends List<T>> list, BiFunction<Supplier<T>, Integer, U> map) createMapped
(Supplier<? extends List<T>> list, BiFunction<T, Supplier<Integer>, U> map) static <T> Supplier
<T> createMemo
(Supplier<SignalLike<T>> signal, Supplier<T> supplier) static <T> Supplier
<T> createMemo
(Supplier<T> supplier) static <T> void
static <T> void
static void
static <T> T
static <T,
V> Supplier <V> maybeConstant
(Supplier<T> supplier, Function<T, V> func) static <T> Supplier
<T> maybeRemoveComputed
(Computed<T> computed) static <T> Supplier
<T> static <T> Runnable
static <T> Runnable
on
(Supplier<T> dep, BiConsumer<T, T> inner) static <T> Runnable
static <T,
U> Supplier <U> static <T,
U> Function <U, U> Sometimes it is useful to explicitly track a dependency instead of using automatic tracking.static <T> Runnable
static <T> Runnable
onDefer
(Supplier<T> dep, BiConsumer<T, T> inner) static <T> Runnable
static <T,
U> Function <U, U> static void
static <T> T
static <T> Consumer
<T> toConsumer
(Runnable runnable) static <T> Function
<T, T> toFunction
(Supplier<T> supplier) static <T> Function
<T, T> toFunction
(T value) toOnFn
(BiConsumer<T, T> consumer) static Runnable
toRunnable
(BiConsumer<Void, Void> consumer) static Runnable
toRunnable
(Consumer<Void> consumer) static Runnable
toRunnable
(Function<Void, Void> consumer) toSupplier
(Runnable runnable)
-
Method Details
-
memo
-
createMemo
-
createMemo
-
maybeRemoveComputed
-
maybeConstant
-
batch
-
ignore
-
ignore
-
on
-
on
-
on
-
on
-
on
Sometimes it is useful to explicitly track a dependency instead of using automatic tracking. The primary added benefit is it makes it easy to get the previous value when reacting to a change. -
onDefer
-
onDefer
-
onDefer
-
onDefer
-
toRunnable
-
toRunnable
-
toRunnable
-
toSupplier
-
toConsumer
-
toFunction
-
toFunction
-
toOnFn
-
run
-
run
-
createMapped
-
createIndexed
-
drain
-
drain
-