Uses of Interface
rx.functions.Func0
Packages that use Func0
Package
Description
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
Functional interfaces of functions and actions of arity 0 to 9 and related
utility classes.
Operators that allow composing Observables to transform and
manipulate data in an asynchronous, functional and thread-safe manner.
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
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
Modifier and TypeMethodDescriptionfinal <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.final <R> Observable<R> Collects items emitted by the source Observable into a single mutable data structure and returns an Observable that emits this structure.static CompletableCompletable.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.final <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.final <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 CompletableCreates a Completable which calls the given error supplier for each subscriber and emits its returned Throwable.final <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.final <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.private <R> Observable<R> Observable.mapNotification(Func1<? super T, ? extends R> onNext, Func1<? super Throwable, ? extends R> onError, Func0<? extends R> onCompleted) final <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 aTimeoutExceptionif either the first item emitted by the source Observable or any subsequent item doesn't arrive within time windows defined by other Observables.final <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.final <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 specifiedmapFactoryfunction, that contains keys and values extracted from the items emitted by the source Observable.final <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 specifiedmapFactoryfunction, that contains an ArrayList of values, extracted by a specifiedvalueSelectorfunction from items emitted by the source Observable and keyed by thekeySelectorfunction.final <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 specifiedmapFactoryfunction, that contains a custom collection of values, extracted by a specifiedvalueSelectorfunction from items emitted by the source Observable, and keyed by thekeySelectorfunction.final <T> Single<T> 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> CompletableCompletable.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> CompletableCompletable.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 setdisposeEagerlytotrueand 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 setdisposeEagerlytotrueand unsubscription does not occur before termination.final <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 Func0Modifier and TypeMethodDescriptionConverts anAction0to a function that calls the action and returnsnull.static <R> Func0<R> Converts anAction0to a function that calls the action and returns a specified value.Methods in rx.functions with parameters of type Func0 -
Uses of Func0 in rx.internal.operators
Classes in rx.internal.operators that implement Func0Modifier and TypeClassDescriptionstatic final classThe default map factory.static final classThe default multimap factory returning a HashMap.Fields in rx.internal.operators declared as Func0Modifier and TypeFieldDescription(package private) final Func0<? extends Observable<? extends TClosing>> OperatorBufferWithSingleObservable.bufferClosingSelector(package private) final Func0<? extends OperatorReplay.ReplayBuffer<T>> OperatorReplay.bufferFactoryA factory that creates the appropriate buffer for the ReplaySubscriber.OnSubscribeCollect.collectionFactory(package private) static final Func0OperatorReplay.DEFAULT_UNBOUNDED_FACTORYOperatorScan.initialValueFactoryOperatorToMap.mapFactoryprivate final Func0<? extends Map<K, Collection<V>>> OperatorToMultimap.mapFactory(package private) final Func0<? extends Observable<? extends T>> OnSubscribeDefer.observableFactoryOperatorMapNotification.MapNotificationSubscriber.onCompletedOperatorMapNotification.onCompleted(package private) final Func0<? extends Observable<? extends U>> OperatorWindowWithObservableFactory.otherFactory(package private) final Func0<? extends Observable<? extends U>> OperatorWindowWithObservableFactory.SourceSubscriber.otherFactoryOnSubscribeUsing.resourceFactorySingleOnSubscribeUsing.resourceFactoryOperatorMulticast.subjectFactory(package private) final Func0<? extends Observable<U>> OnSubscribeDelaySubscriptionWithSelector.subscriptionDelayMethods in rx.internal.operators with parameters of type Func0Modifier and TypeMethodDescription(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 Func0ModifierConstructorDescriptionMapNotificationSubscriber(Subscriber<? super R> actual, Func1<? super T, ? extends R> onNext, Func1<? super 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 Throwable, ? extends R> onError, Func0<? extends R> onCompleted) privateOperatorMulticast(Object guard, AtomicReference<Subject<? super T, ? extends R>> connectedSubject, 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) privateOperatorReplay(Observable.OnSubscribe<T> onSubscribe, Observable<? extends T> source, AtomicReference<OperatorReplay.ReplaySubscriber<T>> current, Func0<? extends OperatorReplay.ReplayBuffer<T>> bufferFactory) 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 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 Map<K, 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 Map<K, Collection<V>>> mapFactory, Func1<? super K, ? extends 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 Func0Modifier and TypeClassDescription(package private) static final class(package private) static final class(package private) static final class(package private) static final classMethods in rx.internal.util that return Func0Modifier and TypeMethodDescriptionstatic <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, 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, 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 Func0Modifier and TypeFieldDescriptionAsyncOnSubscribe.AsyncOnSubscribeImpl.generatorSyncOnSubscribe.SyncOnSubscribeImpl.generatorMethods in rx.observables with parameters of type Func0Modifier and TypeMethodDescriptionstatic <S,T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createSingleState(Func0<? extends S> generator, Action3<? super S, Long, ? super Observer<Observable<? extends T>>> next) Generates a synchronousAsyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.static <S,T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createSingleState(Func0<? extends S> generator, Action3<? super S, Long, ? super Observer<Observable<? extends T>>> next, Action1<? super S> onUnsubscribe) Generates a synchronousAsyncOnSubscribethat calls the providednextfunction 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 synchronousSyncOnSubscribethat calls the providednextfunction 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 synchronousSyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.static <S,T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createStateful(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next) Generates a synchronousAsyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.static <S,T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createStateful(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next, Action1<? super S> onUnsubscribe) Generates a synchronousAsyncOnSubscribethat calls the providednextfunction 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 synchronousSyncOnSubscribethat calls the providednextfunction 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 synchronousSyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.Constructors in rx.observables with parameters of type Func0ModifierConstructorDescriptionAsyncOnSubscribeImpl(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next) (package private)AsyncOnSubscribeImpl(Func0<? extends S> generator, Func3<? super S, 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) (package private)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 Func0Modifier and TypeFieldDescription(package private) static Func0<? extends ScheduledExecutorService> RxJavaHooks.onGenericScheduledExecutorServiceMethods in rx.plugins that return Func0Modifier and TypeMethodDescriptionstatic Func0<? extends ScheduledExecutorService> RxJavaHooks.getOnGenericScheduledExecutorService()Returns the current factory for creating ScheduledExecutorServices in GenericScheduledExecutorService utility.Methods in rx.plugins with parameters of type Func0Modifier and TypeMethodDescriptionstatic voidRxJavaHooks.setOnGenericScheduledExecutorService(Func0<? extends ScheduledExecutorService> factory) Sets the hook function for returning a ScheduledExecutorService used by the GenericScheduledExecutorService for background tasks.