Package org.jsignal.rx
Class RxUtil
java.lang.Object
org.jsignal.rx.RxUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateIndexed(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> voidstatic <T> voidstatic voidstatic <T> Tstatic <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> Runnablestatic <T> Runnableon(Supplier<T> dep, BiConsumer<T, T> inner) static <T> Runnablestatic <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> Runnablestatic <T> RunnableonDefer(Supplier<T> dep, BiConsumer<T, T> inner) static <T> Runnablestatic <T,U> Function <U, U> static voidstatic <T> Tstatic <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 RunnabletoRunnable(BiConsumer<Void, Void> consumer) static RunnabletoRunnable(Consumer<Void> consumer) static RunnabletoRunnable(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
-