Uses of Interface
rx.functions.Func0
-
Packages that use Func0 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. -
-
Uses of Func0 in rx
Methods in rx with parameters of type Func0 Modifier and Type Method Description <TClosing> Observable<java.util.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 Completable
Completable. defer(Func0<? extends Completable> completableFunc0)
Defers the subscription to a Completable instance returned by a supplier.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 source 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.static Completable
Completable. error(Func0<? extends java.lang.Throwable> errorFunc0)
Creates a Completable which calls the given error supplier for each subscriber and emits its returned Throwable.<R> Observable<R>
Observable. flatMap(Func1<? super T,? extends Observable<? extends R>> onNext, Func1<? super java.lang.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 java.lang.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.private <R> Observable<R>
Observable. mapNotification(Func1<? super T,? extends R> onNext, Func1<? super java.lang.Throwable,? extends R> onError, Func0<? extends R> onCompleted)
<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 aTimeoutException
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<java.util.Map<K,V>>Observable. toMap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,V>> mapFactory)
Returns an Observable that emits a single Map, returned by a specifiedmapFactory
function, that contains keys and values extracted from the items emitted by the source Observable.<K,V>
Observable<java.util.Map<K,java.util.Collection<V>>>Observable. toMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory)
Returns an Observable that emits a single Map, returned by a specifiedmapFactory
function, that contains an ArrayList of values, extracted by a specifiedvalueSelector
function from items emitted by the source Observable and keyed by thekeySelector
function.<K,V>
Observable<java.util.Map<K,java.util.Collection<V>>>Observable. toMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory, Func1<? super K,? extends java.util.Collection<V>> collectionFactory)
Returns an Observable that emits a single Map, returned by a specifiedmapFactory
function, that contains a custom collection of values, extracted by a specifiedvalueSelector
function from items emitted by the source Observable, and keyed by thekeySelector
function.<T> Single<T>
Completable. toSingle(Func0<? extends T> completionValueFunc0)
Converts this Completable into a Single which when this Completable completes normally, calls the given supplier and emits its returned value through onSuccess.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<T>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<T>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 setdisposeEagerly
totrue
and unsubscription does not occur before termination.static <T,Resource>
Single<T>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<T>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 setdisposeEagerly
totrue
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. -
Uses of Func0 in rx.functions
Methods in rx.functions that return Func0 Modifier and Type Method Description static Func0<java.lang.Void>
Actions. toFunc(Action0 action)
Converts anAction0
to a function that calls the action and returnsnull
.static <R> Func0<R>
Actions. toFunc(Action0 action, R result)
Converts anAction0
to a function that calls the action and returns a specified value.Methods in rx.functions with parameters of type Func0 Modifier and Type Method Description static <R> FuncN<R>
Functions. fromFunc(Func0<? extends R> f)
-
Uses of Func0 in rx.internal.operators
Classes in rx.internal.operators that implement Func0 Modifier and Type Class Description static class
OperatorToMap.DefaultToMapFactory<K,V>
The default map factory.static class
OperatorToMultimap.DefaultToMultimapFactory<K,V>
The default multimap factory returning a HashMap.Fields in rx.internal.operators declared as Func0 Modifier and Type Field Description (package private) Func0<? extends Observable<? extends TClosing>>
OperatorBufferWithSingleObservable. bufferClosingSelector
(package private) Func0<? extends OperatorReplay.ReplayBuffer<T>>
OperatorReplay. bufferFactory
A factory that creates the appropriate buffer for the ReplaySubscriber.(package private) Func0<R>
OnSubscribeCollect. collectionFactory
(package private) static Func0
OperatorReplay. DEFAULT_UNBOUNDED_FACTORY
private Func0<R>
OperatorScan. initialValueFactory
private Func0<? extends java.util.Map<K,V>>
OperatorToMap. mapFactory
private Func0<? extends java.util.Map<K,java.util.Collection<V>>>
OperatorToMultimap. mapFactory
(package private) Func0<? extends Observable<? extends T>>
OnSubscribeDefer. observableFactory
(package private) Func0<? extends R>
OperatorMapNotification.MapNotificationSubscriber. onCompleted
(package private) Func0<? extends R>
OperatorMapNotification. onCompleted
(package private) Func0<? extends Observable<? extends U>>
OperatorWindowWithObservableFactory. otherFactory
(package private) Func0<? extends Observable<? extends U>>
OperatorWindowWithObservableFactory.SourceSubscriber. otherFactory
private Func0<Resource>
OnSubscribeUsing. resourceFactory
(package private) Func0<Resource>
SingleOnSubscribeUsing. resourceFactory
(package private) Func0<? extends Subject<? super T,? extends R>>
OperatorMulticast. subjectFactory
(package private) Func0<? extends Observable<U>>
OnSubscribeDelaySubscriptionWithSelector. subscriptionDelay
Methods in rx.internal.operators with parameters of type Func0 Modifier and Type Method Description (package private) static <T> ConnectableObservable<T>
OperatorReplay. create(Observable<? extends T> source, Func0<? extends OperatorReplay.ReplayBuffer<T>> bufferFactory)
Creates a OperatorReplay instance to replay values of the given source observable.static <T,U,R>
Observable<R>OperatorReplay. multicastSelector(Func0<? extends ConnectableObservable<U>> connectableFactory, Func1<? super Observable<U>,? extends Observable<R>> selector)
Given a connectable observable factory, it multicasts over the generated ConnectableObservable via a selector function.Constructors in rx.internal.operators with parameters of type Func0 Constructor Description MapNotificationSubscriber(Subscriber<? super R> actual, Func1<? super T,? extends R> onNext, Func1<? super java.lang.Throwable,? extends R> onError, Func0<? extends R> onCompleted)
OnSubscribeCollect(Observable<T> source, Func0<R> collectionFactory, Action2<R,? super T> collector)
OnSubscribeDefer(Func0<? extends Observable<? extends T>> observableFactory)
OnSubscribeDelaySubscriptionWithSelector(Observable<? extends T> source, Func0<? extends Observable<U>> subscriptionDelay)
OnSubscribeUsing(Func0<Resource> resourceFactory, Func1<? super Resource,? extends Observable<? extends T>> observableFactory, Action1<? super Resource> dispose, boolean disposeEagerly)
OperatorBufferWithSingleObservable(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector, int initialCapacity)
OperatorMapNotification(Func1<? super T,? extends R> onNext, Func1<? super java.lang.Throwable,? extends R> onError, Func0<? extends R> onCompleted)
OperatorMulticast(java.lang.Object guard, java.util.concurrent.atomic.AtomicReference<Subject<? super T,? extends R>> connectedSubject, java.util.List<Subscriber<? super R>> waitingForConnect, Observable<? extends T> source, Func0<? extends Subject<? super T,? extends R>> subjectFactory)
OperatorMulticast(Observable<? extends T> source, Func0<? extends Subject<? super T,? extends R>> subjectFactory)
OperatorReplay(Observable.OnSubscribe<T> onSubscribe, Observable<? extends T> source, java.util.concurrent.atomic.AtomicReference<OperatorReplay.ReplaySubscriber<T>> current, Func0<? extends OperatorReplay.ReplayBuffer<T>> bufferFactory)
OperatorScan(Func0<R> initialValueFactory, Func2<R,? super T,R> accumulator)
OperatorTimeoutWithSelector(Func0<? extends Observable<U>> firstTimeoutSelector, Func1<? super T,? extends Observable<V>> timeoutSelector, Observable<? extends T> other)
OperatorToMap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,V>> mapFactory)
ToMap with key selector, value selector and custom Map factory.OperatorToMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory)
ToMultimap with key selector, custom value selector, custom Map factory and default ArrayList collection factory.OperatorToMultimap(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,java.util.Collection<V>>> mapFactory, Func1<? super K,? extends java.util.Collection<V>> collectionFactory)
ToMultimap with key selector, custom value selector, custom Map factory and custom collection factory.OperatorWindowWithObservableFactory(Func0<? extends Observable<? extends U>> otherFactory)
SingleOnSubscribeUsing(Func0<Resource> resourceFactory, Func1<? super Resource,? extends Single<? extends T>> observableFactory, Action1<? super Resource> disposeAction, boolean disposeEagerly)
SourceSubscriber(Subscriber<? super Observable<T>> child, Func0<? extends Observable<? extends U>> otherFactory)
-
Uses of Func0 in rx.internal.util
Classes in rx.internal.util that implement Func0 Modifier and Type Class Description (package private) static class
InternalObservableUtils.ReplaySupplierBuffer<T>
(package private) static class
InternalObservableUtils.ReplaySupplierBufferTime<T>
(package private) static class
InternalObservableUtils.ReplaySupplierNoParams<T>
(package private) static class
InternalObservableUtils.ReplaySupplierTime<T>
Methods in rx.internal.util that return Func0 Modifier and Type Method Description static <T> Func0<ConnectableObservable<T>>
InternalObservableUtils. createReplaySupplier(Observable<T> source)
Returns a Func0 that supplies the ConnectableObservable returned by calling replay() on the source.static <T> Func0<ConnectableObservable<T>>
InternalObservableUtils. createReplaySupplier(Observable<T> source, int bufferSize)
Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.static <T> Func0<ConnectableObservable<T>>
InternalObservableUtils. createReplaySupplier(Observable<T> source, int bufferSize, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.static <T> Func0<ConnectableObservable<T>>
InternalObservableUtils. createReplaySupplier(Observable<T> source, long time, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source. -
Uses of Func0 in rx.observables
Fields in rx.observables declared as Func0 Modifier and Type Field Description private Func0<? extends S>
AsyncOnSubscribe.AsyncOnSubscribeImpl. generator
private Func0<? extends S>
SyncOnSubscribe.SyncOnSubscribeImpl. generator
Methods in rx.observables with parameters of type Func0 Modifier and Type Method Description static <S,T>
AsyncOnSubscribe<S,T>AsyncOnSubscribe. createSingleState(Func0<? extends S> generator, Action3<? super S,java.lang.Long,? super Observer<Observable<? extends T>>> next)
Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,T>
AsyncOnSubscribe<S,T>AsyncOnSubscribe. createSingleState(Func0<? extends S> generator, Action3<? super S,java.lang.Long,? super Observer<Observable<? extends T>>> next, Action1<? super S> onUnsubscribe)
Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,T>
SyncOnSubscribe<S,T>SyncOnSubscribe. createSingleState(Func0<? extends S> generator, Action2<? super S,? super Observer<? super T>> next)
Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,T>
SyncOnSubscribe<S,T>SyncOnSubscribe. createSingleState(Func0<? extends S> generator, Action2<? super S,? super Observer<? super T>> next, Action1<? super S> onUnsubscribe)
Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,T>
AsyncOnSubscribe<S,T>AsyncOnSubscribe. createStateful(Func0<? extends S> generator, Func3<? super S,java.lang.Long,? super Observer<Observable<? extends T>>,? extends S> next)
Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,T>
AsyncOnSubscribe<S,T>AsyncOnSubscribe. createStateful(Func0<? extends S> generator, Func3<? super S,java.lang.Long,? super Observer<Observable<? extends T>>,? extends S> next, Action1<? super S> onUnsubscribe)
Generates a synchronousAsyncOnSubscribe
that calls the providednext
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)
Generates a synchronousSyncOnSubscribe
that calls the providednext
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 synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.Constructors in rx.observables with parameters of type Func0 Constructor Description AsyncOnSubscribeImpl(Func0<? extends S> generator, Func3<? super S,java.lang.Long,? super Observer<Observable<? extends T>>,? extends S> next)
AsyncOnSubscribeImpl(Func0<? extends S> generator, Func3<? super S,java.lang.Long,? super Observer<Observable<? extends T>>,? extends S> next, Action1<? super S> onUnsubscribe)
SyncOnSubscribeImpl(Func0<? extends S> generator, Func2<? super S,? super Observer<? super T>,? extends S> next)
SyncOnSubscribeImpl(Func0<? extends S> generator, Func2<? super S,? super Observer<? super T>,? extends S> next, Action1<? super S> onUnsubscribe)
-
Uses of Func0 in rx.plugins
Fields in rx.plugins declared as Func0 Modifier and Type Field Description (package private) static Func0<? extends java.util.concurrent.ScheduledExecutorService>
RxJavaHooks. onGenericScheduledExecutorService
Methods in rx.plugins that return Func0 Modifier and Type Method Description static Func0<? extends java.util.concurrent.ScheduledExecutorService>
RxJavaHooks. getOnGenericScheduledExecutorService()
Returns the current factory for creating ScheduledExecutorServices in GenericScheduledExecutorService utility.Methods in rx.plugins with parameters of type Func0 Modifier and Type Method Description static void
RxJavaHooks. setOnGenericScheduledExecutorService(Func0<? extends java.util.concurrent.ScheduledExecutorService> factory)
Sets the hook function for returning a ScheduledExecutorService used by the GenericScheduledExecutorService for background tasks.
-