Package | Description |
---|---|
rx |
Rx Observables
|
rx.functions |
Modifier and Type | Method and Description |
---|---|
static <T1,T2,R> Observable<R> |
Observable.combineLatest(Observable<? extends T1> o1,
Observable<? extends T2> o2,
Func2<? super T1,? super T2,? extends R> combineFunction)
Combines two source Observables by emitting an item that aggregates the latest values of each of the
source Observables each time an item is received from either of the source Observables, where this
aggregation is defined by a specified function.
|
<U,R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector)
Returns an Observable that emits the results of a specified function to the pair of values emitted by the
source Observable and a specified collection Observable.
|
<U,R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector,
int maxConcurrent)
Returns an Observable that emits the results of a specified function to the pair of values emitted by the
source Observable and a specified collection Observable, while limiting the maximum number of concurrent
subscriptions to these Observables.
|
<U,R> Observable<R> |
Observable.flatMapIterable(Func1<? super T,? extends Iterable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector)
Returns an Observable that emits the results of applying a function to the pair of values from the source
Observable and an Iterable corresponding to that item that is generated by a selector.
|
<T2,D1,D2,R> |
Observable.groupJoin(Observable<T2> right,
Func1<? super T,? extends Observable<D1>> leftDuration,
Func1<? super T2,? extends Observable<D2>> rightDuration,
Func2<? super T,? super Observable<T2>,? extends R> resultSelector)
Returns an Observable that correlates two Observables when they overlap in time and groups the results.
|
<TRight,TLeftDuration,TRightDuration,R> |
Observable.join(Observable<TRight> right,
Func1<T,Observable<TLeftDuration>> leftDurationSelector,
Func1<TRight,Observable<TRightDuration>> rightDurationSelector,
Func2<T,TRight,R> resultSelector)
Correlates the items emitted by two Observables based on overlapping durations.
|
Observable<T> |
Observable.reduce(Func2<T,T,T> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source
Observable, then feeds the result of that function along with the second item emitted by the source
Observable into the same function, and so on until all items have been emitted by the source Observable,
and emits the final result from the final call to your function as its sole item.
|
<R> Observable<R> |
Observable.reduce(R initialValue,
Func2<R,? super T,R> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source
Observable and a specified seed value, then feeds the result of that function along with the second item
emitted by an Observable into the same function, and so on until all items have been emitted by the
source Observable, emitting the final result from the final call to your function as its sole item.
|
Observable<T> |
Observable.retry(Func2<Integer,Throwable,Boolean> predicate)
Returns an Observable that mirrors the source Observable, resubscribing to it if it calls
onError
and the predicate returns true for that specific exception and retry count. |
Observable<T> |
Observable.scan(Func2<T,T,T> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source
Observable, then feeds the result of that function along with the second item emitted by the source
Observable into the same function, and so on until all items have been emitted by the source Observable,
emitting the result of each of these iterations.
|
<R> Observable<R> |
Observable.scan(R initialValue,
Func2<R,? super T,R> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source
Observable and a seed value, then feeds the result of that function along with the second item emitted by
the source Observable into the same function, and so on until all items have been emitted by the source
Observable, emitting the result of each of these iterations.
|
static <T> Observable<Boolean> |
Observable.sequenceEqual(Observable<? extends T> first,
Observable<? extends T> second,
Func2<? super T,? super T,Boolean> equality)
Returns an Observable that emits a Boolean value that indicates whether two Observable sequences are the
same by comparing the items emitted by each Observable pairwise based on the results of a specified
equality function.
|
Observable<List<T>> |
Observable.toSortedList(Func2<? super T,? super T,Integer> sortFunction)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a
sorted order based on a specified comparison function.
|
Observable<List<T>> |
Observable.toSortedList(Func2<? super T,? super T,Integer> sortFunction,
int initialCapacity)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a
sorted order based on a specified comparison function.
|
<U,R> Observable<R> |
Observable.withLatestFrom(Observable<? extends U> other,
Func2<? super T,? super U,? extends R> resultSelector)
Merges the specified Observable into this Observable sequence by using the
resultSelector
function only when the source Observable (this instance) emits an item. |
static <T1,T2,R> Observable<R> |
Observable.zip(Observable<? extends T1> o1,
Observable<? extends T2> o2,
Func2<? super T1,? super T2,? extends R> zipFunction)
Returns an Observable that emits the results of a specified combiner function applied to combinations of
two items emitted, in sequence, by two other Observables.
|
static <T1,T2,R> Single<R> |
Single.zip(Single<? extends T1> o1,
Single<? extends T2> o2,
Func2<? super T1,? super T2,? extends R> zipFunction)
Returns a Single that emits the results of a specified combiner function applied to two items emitted by
two other Singles.
|
<T2,R> Observable<R> |
Observable.zipWith(Iterable<? extends T2> other,
Func2<? super T,? super T2,? extends R> zipFunction)
Returns an Observable that emits items that are the result of applying a specified function to pairs of
values, one each from the source Observable and a specified Iterable sequence.
|
<T2,R> Observable<R> |
Observable.zipWith(Observable<? extends T2> other,
Func2<? super T,? super T2,? extends R> zipFunction)
Returns an Observable that emits items that are the result of applying a specified function to pairs of
values, one each from the source Observable and another specified Observable.
|
<T2,R> Single<R> |
Single.zipWith(Single<? extends T2> other,
Func2<? super T,? super T2,? extends R> zipFunction)
Returns a Single that emits the result of applying a specified function to the pair of items emitted by
the source Single and another specified Single.
|
Modifier and Type | Method and Description |
---|---|
static <T1,T2> Func2<T1,T2,Void> |
Actions.toFunc(Action2<T1,T2> action)
Converts an
Action2 to a function that calls the action and returns null . |
static <T1,T2,R> Func2<T1,T2,R> |
Actions.toFunc(Action2<T1,T2> action,
R result)
Converts an
Action2 to a function that calls the action and returns a specified value. |
Modifier and Type | Method and Description |
---|---|
static <T0,T1,R> FuncN<R> |
Functions.fromFunc(Func2<? super T0,? super T1,? extends R> f)
|
Copyright © 2015. All Rights Reserved.