public final class ObservableTransformers
extends java.lang.Object
ObservableTransformer,
use Observable.compose(ObservableTransformer)
to apply the operators to an existing sequence.| Modifier and Type | Method and Description |
|---|---|
static <T> io.reactivex.ObservableTransformer<T,java.lang.Long> |
indexOf(io.reactivex.functions.Predicate<? super T> predicate)
Returns the first index of an element that matches a predicate or -1L if no elements match.
|
static <T> io.reactivex.ObservableTransformer<T,T> |
observeOnDrop(io.reactivex.Scheduler scheduler)
Schedules the event emission on a
Scheduler and drops upstream values while
the onNext with the current item is executing on that scheduler. |
static <T> io.reactivex.ObservableTransformer<T,T> |
observeOnLatest(io.reactivex.Scheduler scheduler)
Schedules the event emission on a
Scheduler and keeps the latest upstream item
while the downstream's onNext is executing so that it will resume
with that latest value. |
@SchedulerSupport(value="none")
@CheckReturnValue
@NonNull
public static <T> io.reactivex.ObservableTransformer<T,java.lang.Long> indexOf(@NonNull
io.reactivex.functions.Predicate<? super T> predicate)
T - the upstream element typepredicate - the predicate called to test each item, returning true will
stop the sequence and return the current item index@SchedulerSupport(value="custom")
@CheckReturnValue
@NonNull
public static <T> io.reactivex.ObservableTransformer<T,T> observeOnDrop(@NonNull
io.reactivex.Scheduler scheduler)
Scheduler and drops upstream values while
the onNext with the current item is executing on that scheduler.
Errors are delayed until all items that weren't dropped have been delivered.
T - the element typescheduler - the scheduler to use for emitting events onobserveOnLatest(Scheduler)@SchedulerSupport(value="custom")
@CheckReturnValue
@NonNull
public static <T> io.reactivex.ObservableTransformer<T,T> observeOnLatest(@NonNull
io.reactivex.Scheduler scheduler)
Scheduler and keeps the latest upstream item
while the downstream's onNext is executing so that it will resume
with that latest value.
Errors are delayed until the very last item has been delivered.
T - the element typescheduler - the scheduler to use for emitting events onobserveOnLatest(Scheduler)