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.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 | Interface and Description |
---|---|
static interface |
Completable.CompletableOperator
Convenience interface and callback used by the lift operator that given a child CompletableSubscriber,
return a parent CompletableSubscriber that does any kind of lifecycle-related transformations.
|
static interface |
Completable.CompletableTransformer
Convenience interface and callback used by the compose operator to turn a Completable into another
Completable fluently.
|
static interface |
Observable.Operator<R,T>
Operator function for lifting into an Observable.
|
static interface |
Observable.Transformer<T,R>
Function that receives the current Observable and should return another
Observable, possibly with given element type, in exchange that will be
subscribed to by the downstream operators and subscribers.
|
static interface |
Single.Transformer<T,R>
Transformer function used by
Single.compose(rx.Single.Transformer<? super T, ? extends R>) . |
Modifier and Type | Method and Description |
---|---|
Observable<Boolean> |
Observable.all(Func1<? super T,Boolean> predicate)
Returns an Observable that emits a Boolean that indicates whether all of the items emitted by the source
Observable satisfy a condition.
|
<TOpening,TClosing> |
Observable.buffer(Observable<? extends TOpening> bufferOpenings,
Func1<? super TOpening,? extends Observable<? extends TClosing>> bufferClosingSelector)
Returns an Observable that emits buffers of items it collects from the source Observable.
|
<R> Observable<R> |
Observable.concatMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns a new Observable that emits items resulting from applying a function that you supply to each item
emitted by the source Observable, where that function returns an Observable, and then emitting the items
that result from concatenating those resulting Observables.
|
<R> Observable<R> |
Observable.concatMapDelayError(Func1<? super T,? extends Observable<? extends R>> func)
Maps each of the items into an Observable, subscribes to them one after the other,
one at a time and emits their values in order
while delaying any error from either this or any of the inner Observables
till all of them terminate.
|
<R> Observable<R> |
Observable.concatMapEager(Func1<? super T,? extends Observable<? extends R>> mapper)
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single
Observable.
|
<R> Observable<R> |
Observable.concatMapEager(Func1<? super T,? extends Observable<? extends R>> mapper,
int capacityHint)
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single
Observable.
|
<R> Observable<R> |
Observable.concatMapEager(Func1<? super T,? extends Observable<? extends R>> mapper,
int capacityHint,
int maxConcurrent)
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single
Observable.
|
<R> Observable<R> |
Observable.concatMapIterable(Func1<? super T,? extends Iterable<? extends R>> collectionSelector)
Returns an Observable that concatenate each item emitted by the source Observable with the values in an
Iterable corresponding to that item that is generated by a selector.
|
<U> Observable<T> |
Observable.debounce(Func1<? super T,? extends Observable<U>> debounceSelector)
Returns an Observable that mirrors the source Observable, except that it drops items emitted by the
source Observable that are followed by another item within a computed debounce duration.
|
<U,V> Observable<T> |
Observable.delay(Func0<? extends Observable<U>> subscriptionDelay,
Func1<? super T,? extends Observable<V>> itemDelay)
Returns an Observable that delays the subscription to and emissions from the source Observable via another
Observable on a per-item basis.
|
<U> Observable<T> |
Observable.delay(Func1<? super T,? extends Observable<U>> itemDelay)
Returns an Observable that delays the emissions of the source Observable via another Observable on a
per-item basis.
|
<U> Observable<T> |
Observable.distinct(Func1<? super T,? extends U> keySelector)
Returns an Observable that emits all items emitted by the source Observable that are distinct according
to a key selector function.
|
<U> Observable<T> |
Observable.distinctUntilChanged(Func1<? super T,? extends U> keySelector)
Returns an Observable that emits all items emitted by the source Observable that are distinct from their
immediate predecessors, according to a key selector function.
|
Observable<Boolean> |
Observable.exists(Func1<? super T,Boolean> predicate)
Returns an Observable that emits
true if any item emitted by the source Observable satisfies a
specified condition, otherwise false . |
<R> R |
Observable.extend(Func1<? super Observable.OnSubscribe<T>,? extends R> conversion)
Passes all emitted values from this Observable to the provided conversion function to be collected and
returned as a single value.
|
Observable<T> |
Observable.filter(Func1<? super T,Boolean> predicate)
Filters items emitted by an Observable by only emitting those that satisfy a specified predicate.
|
Observable<T> |
Observable.first(Func1<? super T,Boolean> predicate)
Returns an Observable that emits only the very first item emitted by the source Observable that satisfies
a specified condition, or notifies of an
NoSuchElementException if no such items are emitted. |
Observable<T> |
Observable.firstOrDefault(T defaultValue,
Func1<? super T,Boolean> predicate)
Returns an Observable that emits only the very first item emitted by the source Observable that satisfies
a specified condition, or a default item if the source Observable emits no such items.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns an Observable that emits items based on applying a function that you supply to each item emitted
by the source Observable, where that function returns an Observable, and then merging those resulting
Observables and emitting the results of this merger.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> onNext,
Func1<? super Throwable,? extends Observable<? extends R>> onError,
Func0<? extends Observable<? extends R>> onCompleted)
Returns an Observable that applies a function to each item emitted or notification raised by the source
Observable and then flattens the Observables returned from these functions and emits the resulting items.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> onNext,
Func1<? super Throwable,? extends Observable<? extends R>> onError,
Func0<? extends Observable<? extends R>> onCompleted)
Returns an Observable that applies a function to each item emitted or notification raised by the source
Observable and then flattens the Observables returned from these functions and emits the resulting items.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> onNext,
Func1<? super Throwable,? extends Observable<? extends R>> onError,
Func0<? extends Observable<? extends R>> onCompleted,
int maxConcurrent)
Returns an Observable that applies a function to each item emitted or notification raised by the source
Observable and then flattens the Observables returned from these functions and emits the resulting items,
while limiting the maximum number of concurrent subscriptions to these Observables.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> onNext,
Func1<? super Throwable,? extends Observable<? extends R>> onError,
Func0<? extends Observable<? extends R>> onCompleted,
int maxConcurrent)
Returns an Observable that applies a function to each item emitted or notification raised by the source
Observable and then flattens the Observables returned from these functions and emits the resulting items,
while limiting the maximum number of concurrent subscriptions to these Observables.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> func,
int maxConcurrent)
Returns an Observable that emits items based on applying a function that you supply to each item emitted
by the source Observable, where that function returns an Observable, and then merging those resulting
Observables and emitting the results of this merger, while limiting the maximum number of concurrent
subscriptions to these Observables.
|
<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.
|
<R> Single<R> |
Single.flatMap(Func1<? super T,? extends Single<? extends R>> func)
Returns a Single that is based on applying a specified function to the item emitted by the source Single,
where that function returns a Single.
|
<R> Observable<R> |
Observable.flatMapIterable(Func1<? super T,? extends Iterable<? extends R>> collectionSelector)
Returns an Observable that merges each item emitted by the source Observable with the values in an
Iterable corresponding to that item that is generated by a selector.
|
<R> Observable<R> |
Observable.flatMapIterable(Func1<? super T,? extends Iterable<? extends R>> collectionSelector,
int maxConcurrent)
Returns an Observable that merges each item emitted by the source Observable with the values in an
Iterable corresponding to that item that is generated by a selector, while limiting the 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.
|
<R> Observable<R> |
Single.flatMapObservable(Func1<? super T,? extends Observable<? extends R>> func)
Returns an Observable that emits items based on applying a specified function to the item emitted by the
source Observable, where that function returns an Observable.
|
<K> Observable<GroupedObservable<K,T>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
<K,R> Observable<GroupedObservable<K,R>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends R> elementSelector)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
<K,R> Observable<GroupedObservable<K,R>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends R> elementSelector)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
<K,R> Observable<GroupedObservable<K,R>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends R> elementSelector,
Func1<Action1<K>,Map<K,Object>> evictingMapFactory)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
<K,R> Observable<GroupedObservable<K,R>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends R> elementSelector,
Func1<Action1<K>,Map<K,Object>> evictingMapFactory)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
<K,R> Observable<GroupedObservable<K,R>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends R> elementSelector,
Func1<Action1<K>,Map<K,Object>> evictingMapFactory)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
<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.
|
<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.
|
<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.last(Func1<? super T,Boolean> predicate)
Returns an Observable that emits only the last item emitted by the source Observable that satisfies a
given condition, or notifies of a
NoSuchElementException if no such items are emitted. |
Observable<T> |
Observable.lastOrDefault(T defaultValue,
Func1<? super T,Boolean> predicate)
Returns an Observable that emits only the last item emitted by the source Observable that satisfies a
specified condition, or a default item if no such item is emitted by the source Observable.
|
<R> Single<R> |
Single.map(Func1<? super T,? extends R> func)
Returns a Single that applies a specified function to the item emitted by the source Single and
emits the result of this function application.
|
<R> Observable<R> |
Observable.map(Func1<? super T,? extends R> func)
Returns an Observable that applies a specified function to each item emitted by the source Observable and
emits the results of these function applications.
|
Completable |
Completable.onErrorComplete(Func1<? super Throwable,Boolean> predicate)
Returns a Completable instance that if this Completable emits an error and the predicate returns
true, it will emit an onComplete and swallow the throwable.
|
Completable |
Completable.onErrorResumeNext(Func1<? super Throwable,? extends Completable> errorMapper)
Returns a Completable instance that when encounters an error from this Completable, calls the
specified mapper function that returns another Completable instance for it and resumes the
execution with it.
|
Observable<T> |
Observable.onErrorResumeNext(Func1<Throwable,? extends Observable<? extends T>> resumeFunction)
Instructs an Observable to pass control to another Observable rather than invoking
onError if it encounters an error. |
Single<T> |
Single.onErrorResumeNext(Func1<Throwable,? extends Single<? extends T>> resumeFunctionInCaseOfError)
Instructs a Single to pass control to another Single rather than invoking
Observer.onError(Throwable) if it encounters an error. |
Single<T> |
Single.onErrorReturn(Func1<Throwable,? extends T> resumeFunction)
Instructs a Single to emit an item (returned by a specified function) rather than invoking
onError if it encounters an error. |
Observable<T> |
Observable.onErrorReturn(Func1<Throwable,? extends T> resumeFunction)
Instructs an Observable to emit an item (returned by a specified function) rather than invoking
onError if it encounters an error. |
<R> Observable<R> |
Observable.publish(Func1<? super Observable<T>,? extends Observable<R>> selector)
Returns an Observable that emits the results of invoking a specified selector on items emitted by a
ConnectableObservable that shares a single subscription to the underlying sequence. |
Completable |
Completable.repeatWhen(Func1<? super Observable<? extends Void>,? extends Observable<?>> handler)
Returns a Completable instance that repeats when the Publisher returned by the handler
emits an item or completes when this Publisher emits a completed event.
|
Observable<T> |
Observable.repeatWhen(Func1<? super Observable<? extends Void>,? extends Observable<?>> notificationHandler)
Returns an Observable that emits the same values as the source Observable with the exception of an
onCompleted . |
Observable<T> |
Observable.repeatWhen(Func1<? super Observable<? extends Void>,? extends Observable<?>> notificationHandler,
Scheduler scheduler)
Returns an Observable that emits the same values as the source Observable with the exception of an
onCompleted . |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector)
Returns an Observable that emits items that are the results of invoking a specified selector on the items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
int bufferSize)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying bufferSize notifications. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
int bufferSize,
long time,
TimeUnit unit)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying no more than bufferSize items that were emitted within a specified time window. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
int bufferSize,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying no more than bufferSize items that were emitted within a specified time window. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
int bufferSize,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying a maximum of bufferSize items. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
long time,
TimeUnit unit)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying all items that were emitted within a specified time window. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying all items that were emitted within a specified time window. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable. |
Completable |
Completable.retryWhen(Func1<? super Observable<? extends Throwable>,? extends Observable<?>> handler)
Returns a Completable which given a Publisher and when this Completable emits an error, delivers
that error through an Observable and the Publisher should return a value indicating a retry in response
or a terminal event indicating a termination.
|
Observable<T> |
Observable.retryWhen(Func1<? super Observable<? extends Throwable>,? extends Observable<?>> notificationHandler)
Returns an Observable that emits the same values as the source observable with the exception of an
onError . |
Observable<T> |
Observable.retryWhen(Func1<? super Observable<? extends Throwable>,? extends Observable<?>> notificationHandler,
Scheduler scheduler)
Returns an Observable that emits the same values as the source observable with the exception of an
onError . |
Single<T> |
Single.retryWhen(Func1<Observable<? extends Throwable>,? extends Observable<?>> notificationHandler)
Returns a Single that emits the same values as the source Single with the exception of an
onError . |
Observable<T> |
Observable.single(Func1<? super T,Boolean> predicate)
Returns an Observable that emits the single item emitted by the source Observable that matches a
specified predicate, if that Observable emits one such item.
|
Observable<T> |
Observable.singleOrDefault(T defaultValue,
Func1<? super T,Boolean> predicate)
Returns an Observable that emits the single item emitted by the source Observable that matches a
predicate, if that Observable emits only one such item, or a default item if the source Observable emits
no such items.
|
Observable<T> |
Observable.skipWhile(Func1<? super T,Boolean> predicate)
Returns an Observable that skips all items emitted by the source Observable as long as a specified
condition holds true, but emits all further source items as soon as the condition becomes false.
|
<R> Observable<R> |
Observable.switchMap(Func1<? super T,? extends Observable<? extends R>> func)
Returns a new Observable by applying a function that you supply to each item emitted by the source
Observable that returns an Observable, and then emitting the items emitted by the most recently emitted
of these Observables.
|
<R> Observable<R> |
Observable.switchMapDelayError(Func1<? super T,? extends Observable<? extends R>> func)
Returns a new Observable by applying a function that you supply to each item emitted by the source
Observable that returns an Observable, and then emitting the items emitted by the most recently emitted
of these Observables and delays any error until all Observables terminate.
|
Observable<T> |
Observable.takeFirst(Func1<? super T,Boolean> predicate)
Returns an Observable that emits only the very first item emitted by the source Observable that satisfies
a specified condition.
|
Observable<T> |
Observable.takeUntil(Func1<? super T,Boolean> stopPredicate)
Returns an Observable that emits items emitted by the source Observable, checks the specified predicate
for each item, and then completes if the condition is satisfied.
|
Observable<T> |
Observable.takeWhile(Func1<? super T,Boolean> predicate)
Returns an Observable that emits items emitted by the source Observable so long as each item satisfied a
specified condition, and then completes as soon as this condition is not satisfied.
|
<U,V> Observable<T> |
Observable.timeout(Func0<? extends Observable<U>> firstTimeoutSelector,
Func1<? super T,? extends Observable<V>> timeoutSelector)
Returns an Observable that mirrors the source Observable, but notifies observers of a
TimeoutException if either the first item emitted by the source Observable or any subsequent item
doesn't arrive within time windows defined by other Observables. |
<U,V> Observable<T> |
Observable.timeout(Func0<? extends Observable<U>> firstTimeoutSelector,
Func1<? super T,? extends Observable<V>> timeoutSelector,
Observable<? extends T> other)
Returns an Observable that mirrors the source Observable, but switches to a fallback Observable if either
the first item emitted by the source Observable or any subsequent item doesn't arrive within time windows
defined by other Observables.
|
<V> Observable<T> |
Observable.timeout(Func1<? super T,? extends Observable<V>> timeoutSelector)
Returns an Observable that mirrors the source Observable, but notifies observers of a
TimeoutException if an item emitted by the source Observable doesn't arrive within a window of
time after the emission of the previous item, where that period of time is measured by an Observable that
is a function of the previous item. |
<V> Observable<T> |
Observable.timeout(Func1<? super T,? extends Observable<V>> timeoutSelector,
Observable<? extends T> other)
Returns an Observable that mirrors the source Observable, but that switches to a fallback Observable if
an item emitted by the source Observable doesn't arrive within a window of time after the emission of the
previous item, where that period of time is measured by an Observable that is a function of the previous
item.
|
<U> U |
Completable.to(Func1<? super Completable,U> converter)
Allows fluent conversion to another type via a function callback.
|
<K> Observable<Map<K,T>> |
Observable.toMap(Func1<? super T,? extends K> keySelector)
Returns an Observable that emits a single HashMap containing all items emitted by the source Observable,
mapped by the keys returned by a specified
keySelector function. |
<K,V> Observable<Map<K,V>> |
Observable.toMap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector)
Returns an Observable that emits a single HashMap containing values corresponding to items emitted by the
source Observable, mapped by the keys returned by a specified
keySelector function. |
<K,V> Observable<Map<K,V>> |
Observable.toMap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector)
Returns an Observable that emits a single HashMap containing values corresponding to items emitted by the
source Observable, mapped by the keys returned by a specified
keySelector function. |
<K,V> Observable<Map<K,V>> |
Observable.toMap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,V>> mapFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains keys and values extracted from the items emitted by the source Observable. |
<K,V> Observable<Map<K,V>> |
Observable.toMap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,V>> mapFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains keys and values extracted from the items emitted by the source Observable. |
<K> Observable<Map<K,Collection<T>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector)
Returns an Observable that emits a single HashMap that contains an ArrayList of items emitted by the
source Observable keyed by a specified
keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector)
Returns an Observable that emits a single HashMap that contains an ArrayList of values extracted by a
specified
valueSelector function from items emitted by the source Observable, keyed by a
specified keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector)
Returns an Observable that emits a single HashMap that contains an ArrayList of values extracted by a
specified
valueSelector function from items emitted by the source Observable, keyed by a
specified keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains an ArrayList of values, extracted by a specified valueSelector function from items
emitted by the source Observable and keyed by the keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains an ArrayList of values, extracted by a specified valueSelector function from items
emitted by the source Observable and keyed by the keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory,
Func1<? super K,? extends Collection<V>> collectionFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains a custom collection of values, extracted by a specified valueSelector function from
items emitted by the source Observable, and keyed by the keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory,
Func1<? super K,? extends Collection<V>> collectionFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains a custom collection of values, extracted by a specified valueSelector function from
items emitted by the source Observable, and keyed by the keySelector function. |
<K,V> Observable<Map<K,Collection<V>>> |
Observable.toMultimap(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory,
Func1<? super K,? extends Collection<V>> collectionFactory)
Returns an Observable that emits a single Map, returned by a specified
mapFactory function, that
contains a custom collection of values, extracted by a specified valueSelector function from
items emitted by the source Observable, and keyed by the keySelector function. |
static <R> Completable |
Completable.using(Func0<R> resourceFunc0,
Func1<? super R,? extends Completable> completableFunc1,
Action1<? super R> disposer)
Returns a Completable instance which manages a resource along
with a custom Completable instance while the subscription is active.
|
static <R> Completable |
Completable.using(Func0<R> resourceFunc0,
Func1<? super R,? extends Completable> completableFunc1,
Action1<? super R> disposer,
boolean eager)
Returns a Completable instance which manages a resource along
with a custom Completable instance while the subscription is active and performs eager or lazy
resource disposition.
|
static <T,Resource> |
Observable.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Observable<? extends T>> observableFactory,
Action1<? super Resource> disposeAction)
Constructs an Observable that creates a dependent resource object which is disposed of on unsubscription.
|
static <T,Resource> |
Observable.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Observable<? extends T>> observableFactory,
Action1<? super Resource> disposeAction,
boolean disposeEagerly)
Constructs an Observable that creates a dependent resource object which is disposed of just before
termination if you have set
disposeEagerly to true and unsubscription does not occur
before termination. |
static <T,Resource> |
Single.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Single<? extends T>> singleFactory,
Action1<? super Resource> disposeAction)
Constructs an Single that creates a dependent resource object which is disposed of on unsubscription.
|
static <T,Resource> |
Single.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Single<? extends T>> singleFactory,
Action1<? super Resource> disposeAction,
boolean disposeEagerly)
Constructs an Single that creates a dependent resource object which is disposed of just before
termination if you have set
disposeEagerly to true and unsubscription does not occur
before termination. |
<S extends Scheduler & Subscription> |
Scheduler.when(Func1<Observable<Observable<Completable>>,Completable> combine)
Allows the use of operators for controlling the timing around when
actions scheduled on workers are actually done.
|
<TOpening,TClosing> |
Observable.window(Observable<? extends TOpening> windowOpenings,
Func1<? super TOpening,? extends Observable<? extends TClosing>> closingSelector)
Returns an Observable that emits windows of items it collects from the source Observable.
|
Modifier and Type | Method and Description |
---|---|
static <T1> Func1<T1,Void> |
Actions.toFunc(Action1<T1> action)
Converts an
Action1 to a function that calls the action and returns null . |
static <T1,R> Func1<T1,R> |
Actions.toFunc(Action1<T1> action,
R result)
Converts an
Action1 to a function that calls the action and returns a specified value. |
Modifier and Type | Method and Description |
---|---|
static <T0,R> FuncN<R> |
Functions.fromFunc(Func1<? super T0,? extends R> f)
|
Modifier and Type | Method and Description |
---|---|
T |
BlockingObservable.first(Func1<? super T,Boolean> predicate)
Returns the first item emitted by this
BlockingObservable that matches a predicate, or throws
NoSuchElementException if it emits no such item. |
T |
BlockingObservable.firstOrDefault(T defaultValue,
Func1<? super T,Boolean> predicate)
Returns the first item emitted by this
BlockingObservable that matches a predicate, or a default
value if it emits no such items. |
T |
BlockingObservable.last(Func1<? super T,Boolean> predicate)
Returns the last item emitted by this
BlockingObservable that matches a predicate, or throws
NoSuchElementException if it emits no such items. |
T |
BlockingObservable.lastOrDefault(T defaultValue,
Func1<? super T,Boolean> predicate)
Returns the last item emitted by this
BlockingObservable that matches a predicate, or a default
value if it emits no such items. |
T |
BlockingObservable.single(Func1<? super T,Boolean> predicate)
If this
BlockingObservable completes after emitting a single item that matches a given predicate,
return that item, otherwise throw a NoSuchElementException . |
T |
BlockingObservable.singleOrDefault(T defaultValue,
Func1<? super T,Boolean> predicate)
If this
BlockingObservable completes after emitting a single item that matches a predicate,
return that item; if it emits more than one such item, throw an IllegalArgumentException ; if it
emits no items, return a default value. |
Modifier and Type | Method and Description |
---|---|
static Func1<Completable.CompletableOnSubscribe,Completable.CompletableOnSubscribe> |
RxJavaHooks.getOnCompletableCreate()
Returns the current Completable onCreate hook function or null if it is
set to the default pass-through.
|
static Func1<Completable.CompletableOperator,Completable.CompletableOperator> |
RxJavaHooks.getOnCompletableLift()
Returns the current Completable onLift hook function or null if it is
set to the default pass-through.
|
static Func1<Throwable,Throwable> |
RxJavaHooks.getOnCompletableSubscribeError()
Returns the current Completable onSubscribeError hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnComputationScheduler()
Returns the current computation scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnIOScheduler()
Returns the current io scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnNewThreadScheduler()
Returns the current new thread scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Observable.OnSubscribe,Observable.OnSubscribe> |
RxJavaHooks.getOnObservableCreate()
Returns the current Observable onCreate hook function or null if it is
set to the default pass-through.
|
static Func1<Observable.Operator,Observable.Operator> |
RxJavaHooks.getOnObservableLift()
Returns the current Observable onLift hook function or null if it is
set to the default pass-through.
|
static Func1<Subscription,Subscription> |
RxJavaHooks.getOnObservableReturn()
Returns the current Observable onReturn hook function or null if it is
set to the default pass-through.
|
static Func1<Throwable,Throwable> |
RxJavaHooks.getOnObservableSubscribeError()
Returns the current Observable onSubscribeError hook function or null if it is
set to the default pass-through.
|
static Func1<Action0,Action0> |
RxJavaHooks.getOnScheduleAction()
Returns the current schedule action hook function or null if it is
set to the default pass-through.
|
static Func1<Single.OnSubscribe,Single.OnSubscribe> |
RxJavaHooks.getOnSingleCreate()
Returns the current Single onCreate hook function or null if it is
set to the default pass-through.
|
static Func1<Observable.Operator,Observable.Operator> |
RxJavaHooks.getOnSingleLift()
Returns the current Single onLift hook function or null if it is
set to the default pass-through.
|
static Func1<Subscription,Subscription> |
RxJavaHooks.getOnSingleReturn()
Returns the current Single onReturn hook function or null if it is
set to the default pass-through.
|
static Func1<Throwable,Throwable> |
RxJavaHooks.getOnSingleSubscribeError()
Returns the current Single onSubscribeError hook function or null if it is
set to the default pass-through.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaHooks.setOnCompletableCreate(Func1<Completable.CompletableOnSubscribe,Completable.CompletableOnSubscribe> onCompletableCreate)
Sets the Completable's onCreate hook function unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnCompletableLift(Func1<Completable.CompletableOperator,Completable.CompletableOperator> onCompletableLift)
Sets a hook function that is called with an operator when an Completable operator built with
lift() gets subscribed to.
|
static void |
RxJavaHooks.setOnCompletableSubscribeError(Func1<Throwable,Throwable> onCompletableSubscribeError)
Sets a hook function that is called when the Completable.subscribe() call
fails with an exception.
|
static void |
RxJavaHooks.setOnComputationScheduler(Func1<Scheduler,Scheduler> onComputationScheduler)
Sets the hook function for returning a scheduler when the Schedulers.computation() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnIOScheduler(Func1<Scheduler,Scheduler> onIOScheduler)
Sets the hook function for returning a scheduler when the Schedulers.io() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnNewThreadScheduler(Func1<Scheduler,Scheduler> onNewThreadScheduler)
Sets the hook function for returning a scheduler when the Schedulers.newThread() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnObservableCreate(Func1<Observable.OnSubscribe,Observable.OnSubscribe> onObservableCreate)
Sets the Observable onCreate hook function unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnObservableLift(Func1<Observable.Operator,Observable.Operator> onObservableLift)
Sets a hook function that is called with an operator when an Observable operator built with
lift() gets subscribed to.
|
static void |
RxJavaHooks.setOnObservableReturn(Func1<Subscription,Subscription> onObservableReturn)
Sets a hook function that is called when the Observable.subscribe() call
is about to return a Subscription unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnObservableSubscribeError(Func1<Throwable,Throwable> onObservableSubscribeError)
Sets a hook function that is called when the Observable.subscribe() call
fails with an exception.
|
static void |
RxJavaHooks.setOnScheduleAction(Func1<Action0,Action0> onScheduleAction)
Sets the hook function that is called before an action is scheduled, allowing
decorating that function, unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnSingleCreate(Func1<Single.OnSubscribe,Single.OnSubscribe> onSingleCreate)
Sets the Single onCreate hook function unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnSingleLift(Func1<Observable.Operator,Observable.Operator> onSingleLift)
Sets a hook function that is called with an operator when an Single operator built with
lift() gets subscribed to.
|
static void |
RxJavaHooks.setOnSingleReturn(Func1<Subscription,Subscription> onSingleReturn)
Sets a hook function that is called when the Single.subscribe() call
is about to return a Subscription unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnSingleSubscribeError(Func1<Throwable,Throwable> onSingleSubscribeError)
Sets a hook function that is called when the Single.subscribe() call
fails with an exception.
|
Copyright © 2018. All rights reserved.