public final class RxUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RxUtil.CountingAction<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> rx.Observable.Operator<T,rx.Observable<T>> |
concat() |
static <T> rx.Observable<T> |
concatButIgnoreFirstSequence(rx.Observable<?> o1,
rx.Observable<T> o2)
Returns the concatenation of two
Observables but the first
sequence will be emitted in its entirety and ignored before o2 starts
emitting. |
static <R,S> rx.functions.Func1<R,S> |
constant(S s)
Returns a constant value.
|
static <T> RxUtil.CountingAction<T> |
counter()
Returns an
Action1 that increments a counter when the call method
is called. |
static <T> UnsubscribeDetector<T> |
detectUnsubscribe()
Returns a detector of unsubscribe events.
|
static <T> rx.Observable.Operator<T,rx.Observable<T>> |
flatten()
Returns an
Observable.Operator that flattens a sequence of
Observable into a flat sequence of the items from the
Observables. |
static <T extends Number> |
greaterThanZero() |
static <T> rx.Observer<? super T> |
log()
Logs errors and onNext at info level using slf4j
Logger. |
static <T> rx.functions.Func1<T,rx.Observable<Object>> |
toEmpty()
Returns a
Func1 that returns an empty Observable. |
static <R,T> rx.Observable.Operator<R,T> |
toOperator(rx.functions.Func1<rx.Observable<T>,rx.Observable<R>> operation)
Converts a transformation of an Observable into another Observable into
an
Observable.Operator suitable for use with
Observable.lift(Operator) for instance. |
public static <T> rx.Observable<T> concatButIgnoreFirstSequence(rx.Observable<?> o1,
rx.Observable<T> o2)
Observables but the first
sequence will be emitted in its entirety and ignored before o2 starts
emitting.o1 - the sequence to ignoreo2 - the sequence to emit after o1 ignoredpublic static <T> rx.Observer<? super T> log()
Logger.public static <R,S> rx.functions.Func1<R,S> constant(S s)
s - public static <R,T> rx.Observable.Operator<R,T> toOperator(rx.functions.Func1<rx.Observable<T>,rx.Observable<R>> operation)
Observable.Operator suitable for use with
Observable.lift(Operator) for instance.operation - public static <T> UnsubscribeDetector<T> detectUnsubscribe()
Observable you want to monitor unsubscribe on.public static <T> RxUtil.CountingAction<T> counter()
Action1 that increments a counter when the call method
is called.Action1 to count calls.public static <T> rx.functions.Func1<T,rx.Observable<Object>> toEmpty()
Func1 that returns an empty Observable.public static <T> rx.Observable.Operator<T,rx.Observable<T>> flatten()
Observable.Operator that flattens a sequence of
Observable into a flat sequence of the items from the
Observables. This operator may interleave the items asynchronously. For
synchronous behaviour use concat().public static <T> rx.Observable.Operator<T,rx.Observable<T>> concat()
Copyright © 2014. All Rights Reserved.