Package | Description |
---|---|
rx |
Rx Observables
|
rx.functions |
Modifier and Type | Method and Description |
---|---|
<TClosing> Observable<List<T>> |
Observable.buffer(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector)
Returns an Observable that emits buffers of items it collects from the source Observable.
|
<R> Observable<R> |
Observable.collect(Func0<R> stateFactory,
Action2<R,? super T> collector)
Collects items emitted by the source Observable into a single mutable data structure and returns an
Observable that emits this structure.
|
static <T> Observable<T> |
Observable.defer(Func0<Observable<T>> observableFactory)
Returns an Observable that calls an Observable factory to create an Observable for each new Observer
that subscribes.
|
<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 souce Observable via another
Observable on a per-item basis.
|
<U> Observable<T> |
Observable.delaySubscription(Func0<? extends Observable<U>> subscriptionDelay)
Returns an Observable that delays the subscription to the source Observable until a second Observable
emits an item.
|
<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.
|
<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.
|
<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,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. |
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. |
<TClosing> Observable<Observable<T>> |
Observable.window(Func0<? 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 Func0<Void> |
Actions.toFunc(Action0 action)
Converts an
Action0 to a function that calls the action and returns null . |
static <R> Func0<R> |
Actions.toFunc(Action0 action,
R result)
Converts an
Action0 to a function that calls the action and returns a specified value. |
Modifier and Type | Method and Description |
---|---|
static <R> FuncN<R> |
Functions.fromFunc(Func0<? extends R> f)
|
Copyright © 2015. All Rights Reserved.