Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.functions |
Functional interfaces of functions and actions of arity 0 to 9 and related
utility classes.
|
rx.internal.operators |
Operators that allow composing Observables to transform and
manipulate data in an asynchronous, functional and thread-safe manner.
|
rx.internal.util | |
rx.observables |
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
|
rx.plugins |
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
|
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.
|
Observable<T> |
Observable.distinctUntilChanged(Func2<? super T,? super T,Boolean> comparator)
Returns an Observable that emits all items emitted by the source Observable that are distinct from their
immediate predecessors when compared with each other via the provided comparator 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.
|
<U,R> Observable<R> |
Observable.flatMapIterable(Func1<? super T,? extends Iterable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector,
int maxConcurrent)
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, while limiting the
number of concurrent subscriptions to these Observables.
|
<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.
|
Completable |
Completable.retry(Func2<Integer,Throwable,Boolean> predicate)
Returns a Completable that retries this Completable in case of an error as long as the predicate
returns true.
|
Single<T> |
Single.retry(Func2<Integer,Throwable,Boolean> predicate)
Returns a Single that mirrors the source Single, resubscribing to it if it calls
onError
and the predicate returns true for that specific exception and retry count. |
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<T> |
Observable.sorted(Func2<? super T,? super T,Integer> sortFunction)
Returns an Observable that emits the events emitted by source Observable, in a
sorted order based on a specified comparison 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> s1,
Single<? extends T2> s2,
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)
|
Modifier and Type | Class and Description |
---|---|
class |
OperatorDistinctUntilChanged<T,U>
Returns an Observable that emits all sequentially distinct items emitted by the source.
|
Modifier and Type | Method and Description |
---|---|
static <T> Func2<T,Integer,Boolean> |
OperatorSkipWhile.toPredicate2(Func1<? super T,Boolean> predicate)
Convert to Func2 type predicate.
|
Modifier and Type | Method and Description |
---|---|
static <T> Observable<Boolean> |
OperatorSequenceEqual.sequenceEqual(Observable<? extends T> first,
Observable<? extends T> second,
Func2<? super T,? super T,Boolean> equality)
Tests whether two
Observable sequences are identical, emitting true if both sequences
complete without differing, and false if the two sequences diverge at any point. |
Constructor and Description |
---|
OnSubscribeGroupJoin(Observable<T1> left,
Observable<T2> right,
Func1<? super T1,? extends Observable<D1>> leftDuration,
Func1<? super T2,? extends Observable<D2>> rightDuration,
Func2<? super T1,? super Observable<T2>,? extends R> resultSelector) |
OnSubscribeJoin(Observable<TLeft> left,
Observable<TRight> right,
Func1<TLeft,Observable<TLeftDuration>> leftDurationSelector,
Func1<TRight,Observable<TRightDuration>> rightDurationSelector,
Func2<TLeft,TRight,R> resultSelector) |
OnSubscribeReduce(Observable<T> source,
Func2<T,T,T> reducer) |
OnSubscribeReduceSeed(Observable<T> source,
R initialValue,
Func2<R,? super T,R> reducer) |
OperatorDistinctUntilChanged(Func2<? super U,? super U,Boolean> comparator) |
OperatorMapPair(Func1<? super T,? extends Observable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector) |
OperatorRetryWithPredicate(Func2<Integer,Throwable,Boolean> predicate) |
OperatorScan(Func0<R> initialValueFactory,
Func2<R,? super T,R> accumulator) |
OperatorScan(Func2<R,? super T,R> accumulator)
Applies an accumulator function over an observable sequence and returns each intermediate result with the
specified source and accumulator.
|
OperatorScan(R initialValue,
Func2<R,? super T,R> accumulator)
Applies an accumulator function over an observable sequence and returns each intermediate result with the
specified source and accumulator.
|
OperatorSkipWhile(Func2<? super T,Integer,Boolean> predicate) |
OperatorTakeWhile(Func2<? super T,? super Integer,Boolean> predicate) |
OperatorToObservableSortedList(Func2<? super T,? super T,Integer> sortFunction,
int initialCapacity) |
OperatorWithLatestFrom(Observable<? extends U> other,
Func2<? super T,? super U,? extends R> resultSelector) |
OperatorZip(Func2 f) |
OperatorZipIterable(Iterable<? extends T2> iterable,
Func2<? super T1,? super T2,? extends R> zipFunction) |
RetryWithPredicate(Func2<Integer,Throwable,Boolean> predicate) |
Modifier and Type | Method and Description |
---|---|
static <T,R> Func2<R,T,R> |
InternalObservableUtils.createCollectorCaller(Action2<R,? super T> collector)
Returns a Func2 which calls a collector with its parameters and returns the first (R) parameter.
|
Modifier and Type | Method and Description |
---|---|
static <S,T> SyncOnSubscribe<S,T> |
SyncOnSubscribe.createStateful(Func0<? extends S> generator,
Func2<? super S,? super Observer<? super T>,? extends S> next)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
static <S,T> SyncOnSubscribe<S,T> |
SyncOnSubscribe.createStateful(Func0<? extends S> generator,
Func2<? super S,? super Observer<? super T>,? extends S> next,
Action1<? super S> onUnsubscribe)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
Modifier and Type | Method and Description |
---|---|
static Func2<Completable,Completable.OnSubscribe,Completable.OnSubscribe> |
RxJavaHooks.getOnCompletableStart()
Returns the current Completable onStart hook function or null if it is
set to the default pass-through.
|
static Func2<Observable,Observable.OnSubscribe,Observable.OnSubscribe> |
RxJavaHooks.getOnObservableStart()
Returns the current Observable onStart hook function or null if it is
set to the default pass-through.
|
static Func2<Single,Single.OnSubscribe,Single.OnSubscribe> |
RxJavaHooks.getOnSingleStart()
Returns the current Single onStart hook function or null if it is
set to the default pass-through.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaHooks.setOnCompletableStart(Func2<Completable,Completable.OnSubscribe,Completable.OnSubscribe> onCompletableStart)
Sets the hook function that is called when a subscriber subscribes to a Completable
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnObservableStart(Func2<Observable,Observable.OnSubscribe,Observable.OnSubscribe> onObservableStart)
Sets the hook function that is called when a subscriber subscribes to a Observable
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnSingleStart(Func2<Single,Single.OnSubscribe,Single.OnSubscribe> onSingleStart)
Sets the hook function that is called when a subscriber subscribes to a Single
unless a lockdown is in effect.
|
Copyright © 2018. All rights reserved.