Uses of Interface
rx.functions.Func1
-
Packages that use Func1 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.schedulers 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 Func1 in rx
Subinterfaces of Func1 in rx Modifier and Type Interface 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 bySingle.compose(rx.Single.Transformer<? super T, ? extends R>)
.Methods in rx with parameters of type Func1 Modifier and Type Method Description Observable<java.lang.Boolean>
Observable. all(Func1<? super T,java.lang.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<java.util.List<T>>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 java.lang.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<java.lang.Boolean>
Observable. exists(Func1<? super T,java.lang.Boolean> predicate)
Returns an Observable that emitstrue
if any item emitted by the source Observable satisfies a specified condition, otherwisefalse
.<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,java.lang.Boolean> predicate)
Filters items emitted by an Observable by only emitting those that satisfy a specified predicate.Observable<T>
Observable. first(Func1<? super T,java.lang.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 anNoSuchElementException
if no such items are emitted.Observable<T>
Observable. firstOrDefault(T defaultValue, Func1<? super T,java.lang.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>> 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.<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.<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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 anObservable
according to a specified criterion, and emits these grouped items asGroupedObservable
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 anObservable
according to a specified criterion, and emits these grouped items asGroupedObservable
s.<K,R>
Observable<GroupedObservable<K,R>>Observable. groupBy(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends R> elementSelector, Func1<Action1<K>,java.util.Map<K,java.lang.Object>> evictingMapFactory)
Groups the items emitted by anObservable
according to a specified criterion, and emits these grouped items asGroupedObservable
s.<T2,D1,D2,R>
Observable<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<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,java.lang.Boolean> predicate)
Returns an Observable that emits only the last item emitted by the source Observable that satisfies a given condition, or notifies of aNoSuchElementException
if no such items are emitted.Observable<T>
Observable. lastOrDefault(T defaultValue, Func1<? super T,java.lang.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> 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.<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.private <R> Observable<R>
Observable. mapNotification(Func1<? super T,? extends R> onNext, Func1<? super java.lang.Throwable,? extends R> onError, Func0<? extends R> onCompleted)
Completable
Completable. onErrorComplete(Func1<? super java.lang.Throwable,java.lang.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 java.lang.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<java.lang.Throwable,? extends Observable<? extends T>> resumeFunction)
Instructs an Observable to pass control to another Observable rather than invokingonError
if it encounters an error.Single<T>
Single. onErrorResumeNext(Func1<java.lang.Throwable,? extends Single<? extends T>> resumeFunctionInCaseOfError)
Instructs a Single to pass control to another Single rather than invokingObserver.onError(Throwable)
if it encounters an error.Observable<T>
Observable. onErrorReturn(Func1<java.lang.Throwable,? extends T> resumeFunction)
Instructs an Observable to emit an item (returned by a specified function) rather than invokingonError
if it encounters an error.Single<T>
Single. onErrorReturn(Func1<java.lang.Throwable,? extends T> resumeFunction)
Instructs a Single to emit an item (returned by a specified function) rather than invokingonError
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 aConnectableObservable
that shares a single subscription to the underlying sequence.Completable
Completable. repeatWhen(Func1<? super Observable<? extends java.lang.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 java.lang.Void>,? extends Observable<?>> notificationHandler)
Returns an Observable that emits the same values as the source Observable with the exception of anonCompleted
.Observable<T>
Observable. repeatWhen(Func1<? super Observable<? extends java.lang.Void>,? extends Observable<?>> notificationHandler, Scheduler scheduler)
Returns an Observable that emits the same values as the source Observable with the exception of anonCompleted
.<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 aConnectableObservable
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 aConnectableObservable
that shares a single subscription to the source Observable, replayingbufferSize
notifications.<R> Observable<R>
Observable. replay(Func1<? super Observable<T>,? extends Observable<R>> selector, int bufferSize, long time, java.util.concurrent.TimeUnit unit)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by aConnectableObservable
that shares a single subscription to the source Observable, replaying no more thanbufferSize
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, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by aConnectableObservable
that shares a single subscription to the source Observable, replaying no more thanbufferSize
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 aConnectableObservable
that shares a single subscription to the source Observable, replaying a maximum ofbufferSize
items.<R> Observable<R>
Observable. replay(Func1<? super Observable<T>,? extends Observable<R>> selector, long time, java.util.concurrent.TimeUnit unit)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by aConnectableObservable
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, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by aConnectableObservable
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 aConnectableObservable
that shares a single subscription to the source Observable.Completable
Completable. retryWhen(Func1<? super Observable<? extends java.lang.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 java.lang.Throwable>,? extends Observable<?>> notificationHandler)
Returns an Observable that emits the same values as the source observable with the exception of anonError
.Observable<T>
Observable. retryWhen(Func1<? super Observable<? extends java.lang.Throwable>,? extends Observable<?>> notificationHandler, Scheduler scheduler)
Returns an Observable that emits the same values as the source observable with the exception of anonError
.Single<T>
Single. retryWhen(Func1<Observable<? extends java.lang.Throwable>,? extends Observable<?>> notificationHandler)
Returns a Single that emits the same values as the source Single with the exception of anonError
.Observable<T>
Observable. single(Func1<? super T,java.lang.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,java.lang.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,java.lang.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,java.lang.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,java.lang.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,java.lang.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 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.<V> Observable<T>
Observable. timeout(Func1<? super T,? extends Observable<V>> timeoutSelector)
Returns an Observable that mirrors the source Observable, but notifies observers of aTimeoutException
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<java.util.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 specifiedkeySelector
function.<K,V>
Observable<java.util.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 specifiedkeySelector
function.<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> Observable<java.util.Map<K,java.util.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 specifiedkeySelector
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)
Returns an Observable that emits a single HashMap that contains an ArrayList of values extracted by a specifiedvalueSelector
function from items emitted by the source Observable, keyed by a specifiedkeySelector
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)
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.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.<S extends Scheduler & Subscription>
SScheduler. 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<Observable<T>>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. -
Uses of Func1 in rx.functions
Methods in rx.functions that return Func1 Modifier and Type Method Description static <T1> Func1<T1,java.lang.Void>
Actions. toFunc(Action1<T1> action)
Converts anAction1
to a function that calls the action and returnsnull
.static <T1,R>
Func1<T1,R>Actions. toFunc(Action1<T1> action, R result)
Converts anAction1
to a function that calls the action and returns a specified value.Methods in rx.functions with parameters of type Func1 Modifier and Type Method Description static <T0,R>
FuncN<R>Functions. fromFunc(Func1<? super T0,? extends R> f)
-
Uses of Func1 in rx.internal.operators
Classes in rx.internal.operators that implement Func1 Modifier and Type Class Description static class
OnSubscribeRedo.RedoFinite
static class
OnSubscribeRedo.RetryWithPredicate
class
OperatorAll<T>
Returns an Observable that emits a Boolean that indicates whether all items emitted by an Observable satisfy a condition.class
OperatorAny<T>
Returns anObservable
that emitstrue
if any element of an observable sequence satisfies a condition, otherwisefalse
.class
OperatorAsObservable<T>
Hides the identity of another observable.class
OperatorBufferWithSingleObservable<T,TClosing>
This operation takes values from the specifiedObservable
source and stores them in a buffer until theObservable
constructed using theFunc0
argument, produces a value.class
OperatorBufferWithSize<T>
This operation takes values from the specifiedObservable
source and stores them in all active chunks until the buffer contains a specified number of elements.class
OperatorBufferWithStartEndObservable<T,TOpening,TClosing>
This operation takes values from the specifiedObservable
source and stores them in the currently active chunks.class
OperatorBufferWithTime<T>
This operation takes values from the specifiedObservable
source and stores them in a buffer.class
OperatorCast<T,R>
Converts the elements of an observable sequence to the specified type.class
OperatorDebounceWithSelector<T,U>
Delay the emission via another observable if no new source appears in the meantime.class
OperatorDebounceWithTime<T>
This operation filters out events which are published too quickly in succession.class
OperatorDelay<T>
Delays the emission of onNext events by a given amount of time.class
OperatorDelayWithSelector<T,V>
Delay the subscription and emission of the source items by a per-item observable that fires its first element.class
OperatorDematerialize<T>
Reverses the effect ofOperatorMaterialize
by transforming the Notification objects emitted by a source Observable into the items or notifications they represent.class
OperatorDistinct<T,U>
Returns an Observable that emits all distinct items emitted by the source.class
OperatorDistinctUntilChanged<T,U>
Returns an Observable that emits all sequentially distinct items emitted by the source.class
OperatorDoAfterTerminate<T>
Registers an action to be called after an Observable invokesonComplete
oronError
.class
OperatorDoOnEach<T>
Converts the elements of an observable sequence to the specified type.class
OperatorDoOnRequest<T>
This operator modifies anObservable
so a given action is invoked when theProducer
receives a request.class
OperatorDoOnSubscribe<T>
This operator modifies anObservable
so a given action is invoked when theObservable
is subscribed.class
OperatorDoOnUnsubscribe<T>
This operator modifies anObservable
so a given action is invoked when theObservable
is unsubscribed.class
OperatorEagerConcatMap<T,R>
class
OperatorElementAt<T>
Returns the element at a specified index in a sequence.class
OperatorGroupBy<T,K,V>
Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as Observables, one Observable per group.class
OperatorIgnoreElements<T>
class
OperatorMapNotification<T,R>
Applies a function of your choosing to every item emitted by anObservable
, and emits the results of this transformation as a newObservable
.class
OperatorMapPair<T,U,R>
AnObservable.Operator
that pairs up items emitted by a sourceObservable
with the sequence of items emitted by theObservable
that is derived from each item by means of a selector, and emits the results of this pairing.(package private) static class
OperatorMapPair.OuterInnerMapper<T,U,R>
class
OperatorMaterialize<T>
Turns all of the notifications from an Observable intoonNext
emissions, and marks them with their original notification types withinNotification
objects.class
OperatorMerge<T>
Flattens a list ofObservable
s into oneObservable
, without any transformation.class
OperatorObserveOn<T>
Delivers events on the specifiedScheduler
asynchronously via an unbounded buffer.class
OperatorOnBackpressureBuffer<T>
class
OperatorOnBackpressureDrop<T>
class
OperatorOnBackpressureLatest<T>
An operator which drops all but the last received value in case the downstream doesn't request more.class
OperatorOnErrorResumeNextViaFunction<T>
Instruct an Observable to pass control to another Observable (the return value of a function) rather than invokingonError
if it encounters an error.class
OperatorRetryWithPredicate<T>
class
OperatorSampleWithObservable<T,U>
Sample with the help of another observable.class
OperatorSampleWithTime<T>
Returns an Observable that emits the results of sampling the items emitted by the source Observable at a specified time interval.class
OperatorScan<R,T>
Returns an Observable that applies a function to the first item emitted by a source Observable, 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 result of each of these iterations.class
OperatorSerialize<T>
class
OperatorSingle<T>
If the Observable completes after emitting a single item that matches a predicate, return an Observable containing that item.class
OperatorSkip<T>
Returns an Observable that skips the firstnum
items emitted by the source Observable.class
OperatorSkipLast<T>
Bypasses a specified number of elements at the end of an observable sequence.class
OperatorSkipLastTimed<T>
Skip delivering values in the time window before the values.class
OperatorSkipTimed<T>
Skips elements until a specified time elapses.class
OperatorSkipUntil<T,U>
Skip elements from the source Observable until the secondary observable fires an element.class
OperatorSkipWhile<T>
Skips any emitted source items as long as the specified condition holds true.class
OperatorSwitch<T>
Transforms an Observable that emits Observables into a single Observable that emits the items emitted by the most recently published of those Observables.class
OperatorSwitchIfEmpty<T>
If the Observable completes without emitting any items, subscribe to an alternate Observable.class
OperatorTake<T>
AnObservable
that emits the firstnum
items emitted by the sourceObservable
.class
OperatorTakeLast<T>
Returns an Observable that emits the at most the lastcount
items emitted by the source Observable.(package private) static class
OperatorTakeLast.TakeLastSubscriber<T>
class
OperatorTakeLastTimed<T>
Returns an Observable that emits the lastcount
items emitted by the source Observable.(package private) static class
OperatorTakeLastTimed.TakeLastTimedSubscriber<T>
class
OperatorTakeTimed<T>
Takes values from the source until the specific time elapses.class
OperatorTakeUntil<T,E>
Returns an Observable that emits the items from the source Observable until another Observable emits an item.class
OperatorTakeUntilPredicate<T>
Returns an Observable that emits items emitted by the source Observable until the provided predicate returns falseclass
OperatorTakeWhile<T>
O Returns an Observable that emits items emitted by the source Observable as long as a specified condition is true.class
OperatorThrottleFirst<T>
Throttle by windowing a stream and returning the first value in each window.class
OperatorTimeInterval<T>
Records the time interval between consecutive elements in an observable sequence.class
OperatorTimeout<T>
Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers.(package private) class
OperatorTimeoutBase<T>
class
OperatorTimeoutWithSelector<T,U,V>
Returns an Observable that mirrors the source Observable.class
OperatorTimestamp<T>
Wraps each item emitted by a sourceObservable
in aTimestamped
object.class
OperatorToMap<T,K,V>
Maps the elements of the source observable into a java.util.Map instance and emits that once the source observable completes.class
OperatorToMultimap<T,K,V>
Maps the elements of the source observable into a multimap (Map<K, Collection<V>>) where each key entry has a collection of the source's values.static class
OperatorToMultimap.DefaultMultimapCollectionFactory<K,V>
The default collection factory for a key in the multimap returning an ArrayList independent of the key.class
OperatorToObservableList<T>
Returns anObservable
that emits a single item, a list composed of all the items emitted by the sourceObservable
.class
OperatorToObservableSortedList<T>
Return anObservable
that emits the items emitted by the sourceObservable
, in a sorted order (each item emitted by theObservable
must implementComparable
with respect to all other items in the sequence, or you must pass in a sort function).class
OperatorUnsubscribeOn<T>
Unsubscribes on the specified Scheduler.class
OperatorWindowWithObservable<T,U>
Creates non-overlapping windows of items where each window is terminated by an event from a secondary observable and a new window is started immediately.class
OperatorWindowWithObservableFactory<T,U>
Creates non-overlapping windows of items where each window is terminated by an event from a secondary observable and a new window is started immediately.class
OperatorWindowWithSize<T>
Creates windows of values into the source sequence with skip frequency and size bounds.class
OperatorWindowWithStartEndObservable<T,U,V>
Creates potentially overlapping windows of the source items where each window is started by a value emitted by an observable and closed when an associated Observable emits a value or completes.class
OperatorWindowWithTime<T>
Creates windows of values into the source sequence with timed window creation, length and size bounds.class
OperatorWithLatestFrom<T,U,R>
Combines values from two sources only when the main source emits.class
OperatorZip<R>
Returns an Observable that emits the results of a function applied to sets of items emitted, in sequence, by two or more other Observables.class
OperatorZipIterable<T1,T2,R>
Fields in rx.internal.operators declared as Func1 Modifier and Type Field Description (package private) Func1<? super TOpening,? extends Observable<? extends TClosing>>
OperatorBufferWithStartEndObservable. bufferClosing
(package private) Func1<? super K,? extends java.util.Collection<V>>
OperatorToMultimap. collectionFactory
(package private) Func1<? super T,? extends Observable<? extends U>>
OperatorMapPair. collectionSelector
(package private) Func1<? super T,? extends Observable<? extends U>>
OperatorMapPair.MapPairSubscriber. collectionSelector
private Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>>
OnSubscribeRedo. controlHandlerFunction
(package private) Func1<? super T,? extends Observable<V>>
OperatorDelayWithSelector. itemDelay
(package private) Func1<? super T,? extends U>
OperatorDistinct. keySelector
(package private) Func1<? super T,? extends U>
OperatorDistinctUntilChanged. keySelector
(package private) Func1<? super T,? extends K>
OperatorGroupBy.GroupBySubscriber. keySelector
(package private) Func1<? super T,? extends K>
OperatorGroupBy. keySelector
(package private) Func1<? super T,? extends K>
OperatorToMap. keySelector
(package private) Func1<? super T,? extends K>
OperatorToMultimap. keySelector
(package private) Func1<? super T1,? extends Observable<D1>>
OnSubscribeGroupJoin. leftDuration
(package private) Func1<TLeft,Observable<TLeftDuration>>
OnSubscribeJoin. leftDurationSelector
(package private) Func1<Action1<K>,java.util.Map<K,java.lang.Object>>
OperatorGroupBy. mapFactory
(package private) Func1<? super T,? extends Observable<? extends R>>
OnSubscribeConcatMap.ConcatMapSubscriber. mapper
(package private) Func1<? super T,? extends Observable<? extends R>>
OnSubscribeConcatMap. mapper
(package private) Func1<? super T,? extends java.lang.Iterable<? extends R>>
OnSubscribeFlattenIterable.FlattenIterableSubscriber. mapper
(package private) Func1<? super T,? extends java.lang.Iterable<? extends R>>
OnSubscribeFlattenIterable. mapper
(package private) Func1<? super T,? extends java.lang.Iterable<? extends R>>
OnSubscribeFlattenIterable.OnSubscribeScalarFlattenIterable. mapper
(package private) Func1<? super T,? extends R>
OnSubscribeMap.MapSubscriber. mapper
(package private) Func1<? super T,? extends Observable<? extends R>>
OperatorEagerConcatMap.EagerOuterSubscriber. mapper
(package private) Func1<? super T,? extends Observable<? extends R>>
OperatorEagerConcatMap. mapper
(package private) Func1<? super T,? extends R>
SingleOnSubscribeMap.MapSubscriber. mapper
private Func1<? super Resource,? extends Observable<? extends T>>
OnSubscribeUsing. observableFactory
(package private) Func1<? super java.lang.Throwable,? extends R>
OperatorMapNotification.MapNotificationSubscriber. onError
(package private) Func1<? super java.lang.Throwable,? extends R>
OperatorMapNotification. onError
(package private) Func1<? super T,? extends R>
OperatorMapNotification.MapNotificationSubscriber. onNext
(package private) Func1<? super T,? extends R>
OperatorMapNotification. onNext
(package private) Func1<? super T,java.lang.Boolean>
OnSubscribeFilter.FilterSubscriber. predicate
(package private) Func1<? super T,java.lang.Boolean>
OnSubscribeFilter. predicate
(package private) Func1<? super T,java.lang.Boolean>
OperatorAll. predicate
(package private) Func1<? super T,java.lang.Boolean>
OperatorAny. predicate
(package private) static Func1<Observable<? extends Notification<?>>,Observable<?>>
OnSubscribeRedo. REDO_INFINITE
(package private) Func1<java.lang.Throwable,? extends Observable<? extends T>>
OperatorOnErrorResumeNextViaFunction. resumeFunction
private Func1<java.lang.Throwable,? extends Single<? extends T>>
SingleOperatorOnErrorResumeNext. resumeFunctionInCaseOfError
(package private) Func1<? super T2,? extends Observable<D2>>
OnSubscribeGroupJoin. rightDuration
(package private) Func1<TRight,Observable<TRightDuration>>
OnSubscribeJoin. rightDurationSelector
(package private) Func1<? super T,? extends Observable<U>>
OperatorDebounceWithSelector. selector
(package private) Func1<? super Resource,? extends Single<? extends T>>
SingleOnSubscribeUsing. singleFactory
(package private) Func1<? super T,java.lang.Boolean>
OperatorTakeUntilPredicate. stopPredicate
(package private) Func1<? super T,? extends R>
OnSubscribeMap. transformer
(package private) Func1<? super T,? extends R>
SingleOnSubscribeMap. transformer
(package private) Func1<? super T,? extends V>
OperatorGroupBy.GroupBySubscriber. valueSelector
(package private) Func1<? super T,? extends V>
OperatorGroupBy. valueSelector
(package private) Func1<? super T,? extends V>
OperatorToMap. valueSelector
(package private) Func1<? super T,? extends V>
OperatorToMultimap. valueSelector
(package private) Func1<? super U,? extends Observable<? extends V>>
OperatorWindowWithStartEndObservable. windowClosingSelector
Methods in rx.internal.operators that return Func1 Modifier and Type Method Description static <T,U>
Func1<T,Observable<U>>OperatorMapPair. convertSelector(Func1<? super T,? extends java.lang.Iterable<? extends U>> selector)
Creates the function that generates aObservable
based on an item emitted by anotherObservable
.Methods in rx.internal.operators with parameters of type Func1 Modifier and Type Method Description static <T,U>
Func1<T,Observable<U>>OperatorMapPair. convertSelector(Func1<? super T,? extends java.lang.Iterable<? extends U>> selector)
Creates the function that generates aObservable
based on an item emitted by anotherObservable
.static <T,R>
Observable<R>OperatorPublish. create(Observable<? extends T> source, Func1<? super Observable<T>,? extends Observable<R>> selector)
static <T,R>
Observable<R>OperatorPublish. create(Observable<? extends T> source, Func1<? super Observable<T>,? extends Observable<R>> selector, boolean delayError)
static <T,R>
Observable<R>OnSubscribeFlattenIterable. createFrom(Observable<? extends T> source, Func1<? super T,? extends java.lang.Iterable<? extends R>> mapper, int prefetch)
private java.util.Map<java.lang.Object,OperatorGroupBy.GroupedUnicast<K,V>>
OperatorGroupBy.GroupBySubscriber. createMap(Func1<Action1<K>,java.util.Map<K,java.lang.Object>> mapFactory, Action1<K> evictionAction)
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.static <T,R>
voidBackpressureUtils. postCompleteDone(java.util.concurrent.atomic.AtomicLong requested, java.util.Queue<T> queue, Subscriber<? super R> actual, Func1<? super T,? extends R> exitTransform)
Signals the completion of the main sequence and switches to post-completion replay mode and allows exit transformation on the queued values.(package private) static <T,R>
voidBackpressureUtils. postCompleteDrain(java.util.concurrent.atomic.AtomicLong requested, java.util.Queue<T> queue, Subscriber<? super R> subscriber, Func1<? super T,? extends R> exitTransform)
Drains the queue based on the outstanding requests in post-completed mode (only!) and allows exit transformation on the queued values.static <T,R>
booleanBackpressureUtils. postCompleteRequest(java.util.concurrent.atomic.AtomicLong requested, long n, java.util.Queue<T> queue, Subscriber<? super R> actual, Func1<? super T,? extends R> exitTransform)
Accumulates requests (validated) and handles the completed mode draining of the queue based on the requests and allows exit transformation on the queued values.static <T> Observable<T>
OnSubscribeRedo. redo(Observable<T> source, Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>> notificationHandler, Scheduler scheduler)
static <T> Observable<T>
OnSubscribeRedo. repeat(Observable<T> source, Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>> notificationHandler)
static <T> Observable<T>
OnSubscribeRedo. repeat(Observable<T> source, Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>> notificationHandler, Scheduler scheduler)
static <T> Observable<T>
OnSubscribeRedo. retry(Observable<T> source, Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>> notificationHandler)
static <T> Observable<T>
OnSubscribeRedo. retry(Observable<T> source, Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>> notificationHandler, Scheduler scheduler)
static <T> Func2<T,java.lang.Integer,java.lang.Boolean>
OperatorSkipWhile. toPredicate2(Func1<? super T,java.lang.Boolean> predicate)
Convert to Func2 type predicate.static <T> SingleOperatorOnErrorResumeNext<T>
SingleOperatorOnErrorResumeNext. withFunction(Single<? extends T> originalSingle, Func1<java.lang.Throwable,? extends Single<? extends T>> resumeFunctionInCaseOfError)
static <T> OperatorOnErrorResumeNextViaFunction<T>
OperatorOnErrorResumeNextViaFunction. withSingle(Func1<java.lang.Throwable,? extends T> resumeFunction)
Constructors in rx.internal.operators with parameters of type Func1 Constructor Description ConcatMapSubscriber(Subscriber<? super R> actual, Func1<? super T,? extends Observable<? extends R>> mapper, int prefetch, int delayErrorMode)
EagerOuterSubscriber(Func1<? super T,? extends Observable<? extends R>> mapper, int bufferSize, int maxConcurrent, Subscriber<? super R> actual)
FilterSubscriber(Subscriber<? super T> actual, Func1<? super T,java.lang.Boolean> predicate)
FlattenIterableSubscriber(Subscriber<? super R> actual, Func1<? super T,? extends java.lang.Iterable<? extends R>> mapper, int prefetch)
GroupBySubscriber(Subscriber<? super GroupedObservable<K,V>> actual, Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, int bufferSize, boolean delayError, Func1<Action1<K>,java.util.Map<K,java.lang.Object>> mapFactory)
MapNotificationSubscriber(Subscriber<? super R> actual, Func1<? super T,? extends R> onNext, Func1<? super java.lang.Throwable,? extends R> onError, Func0<? extends R> onCompleted)
MapPairSubscriber(Subscriber<? super Observable<? extends R>> actual, Func1<? super T,? extends Observable<? extends U>> collectionSelector, Func2<? super T,? super U,? extends R> resultSelector)
MapSubscriber(Subscriber<? super R> actual, Func1<? super T,? extends R> mapper)
MapSubscriber(SingleSubscriber<? super R> actual, Func1<? super T,? extends R> mapper)
OnSubscribeConcatMap(Observable<? extends T> source, Func1<? super T,? extends Observable<? extends R>> mapper, int prefetch, int delayErrorMode)
OnSubscribeFilter(Observable<T> source, Func1<? super T,java.lang.Boolean> predicate)
OnSubscribeFlattenIterable(Observable<? extends T> source, Func1<? super T,? extends java.lang.Iterable<? extends R>> mapper, int prefetch)
Protected: use createFrom to handle source-dependent optimizations.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)
OnSubscribeMap(Observable<T> source, Func1<? super T,? extends R> transformer)
OnSubscribeRedo(Observable<T> source, Func1<? super Observable<? extends Notification<?>>,? extends Observable<?>> f, boolean stopOnComplete, boolean stopOnError, Scheduler scheduler)
OnSubscribeScalarFlattenIterable(T value, Func1<? super T,? extends java.lang.Iterable<? extends R>> mapper)
OnSubscribeUsing(Func0<Resource> resourceFactory, Func1<? super Resource,? extends Observable<? extends T>> observableFactory, Action1<? super Resource> dispose, boolean disposeEagerly)
OperatorAll(Func1<? super T,java.lang.Boolean> predicate)
OperatorAny(Func1<? super T,java.lang.Boolean> predicate, boolean returnOnEmpty)
OperatorBufferWithStartEndObservable(Observable<? extends TOpening> bufferOpenings, Func1<? super TOpening,? extends Observable<? extends TClosing>> bufferClosingSelector)
OperatorDebounceWithSelector(Func1<? super T,? extends Observable<U>> selector)
OperatorDelayWithSelector(Observable<? extends T> source, Func1<? super T,? extends Observable<V>> itemDelay)
OperatorDistinct(Func1<? super T,? extends U> keySelector)
OperatorDistinctUntilChanged(Func1<? super T,? extends U> keySelector)
OperatorEagerConcatMap(Func1<? super T,? extends Observable<? extends R>> mapper, int bufferSize, int maxConcurrent)
OperatorGroupBy(Func1<? super T,? extends K> keySelector)
OperatorGroupBy(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector)
OperatorGroupBy(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, int bufferSize, boolean delayError, Func1<Action1<K>,java.util.Map<K,java.lang.Object>> mapFactory)
OperatorGroupBy(Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func1<Action1<K>,java.util.Map<K,java.lang.Object>> mapFactory)
OperatorMapNotification(Func1<? super T,? extends R> onNext, Func1<? super java.lang.Throwable,? extends R> onError, Func0<? extends R> onCompleted)
OperatorMapPair(Func1<? super T,? extends Observable<? extends U>> collectionSelector, Func2<? super T,? super U,? extends R> resultSelector)
OperatorOnErrorResumeNextViaFunction(Func1<java.lang.Throwable,? extends Observable<? extends T>> f)
OperatorTakeUntilPredicate(Func1<? super T,java.lang.Boolean> stopPredicate)
OperatorTakeWhile(Func1<? super T,java.lang.Boolean> underlying)
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)
ToMap with key selector, value selector and default HashMap factory.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)
ToMultimap with key selector, custom value selector, default HashMap 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)
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.OperatorWindowWithStartEndObservable(Observable<? extends U> windowOpenings, Func1<? super U,? extends Observable<? extends V>> windowClosingSelector)
SingleOnSubscribeMap(Single<T> source, Func1<? super T,? extends R> transformer)
SingleOnSubscribeUsing(Func0<Resource> resourceFactory, Func1<? super Resource,? extends Single<? extends T>> observableFactory, Action1<? super Resource> disposeAction, boolean disposeEagerly)
SingleOperatorOnErrorResumeNext(Single<? extends T> originalSingle, Func1<java.lang.Throwable,? extends Single<? extends T>> resumeFunctionInCaseOfError)
-
Uses of Func1 in rx.internal.schedulers
Constructors in rx.internal.schedulers with parameters of type Func1 Constructor Description SchedulerWhen(Func1<Observable<Observable<Completable>>,Completable> combine, Scheduler actualScheduler)
-
Uses of Func1 in rx.internal.util
Classes in rx.internal.util that implement Func1 Modifier and Type Class Description (package private) static class
InternalObservableUtils.EqualsWithFunc1
(package private) static class
InternalObservableUtils.IsInstanceOfFunc1
(package private) static class
InternalObservableUtils.NotificationErrorExtractor
(package private) static class
InternalObservableUtils.RepeatNotificationDematerializer
(package private) static class
InternalObservableUtils.RetryNotificationDematerializer
(package private) static class
InternalObservableUtils.ReturnsVoidFunc1
(package private) static class
InternalObservableUtils.SelectorAndObserveOn<T,R>
(package private) static class
InternalObservableUtils.ToArrayFunc1
(package private) static class
UtilityFunctions.AlwaysFalse
(package private) static class
UtilityFunctions.AlwaysTrue
Fields in rx.internal.util declared as Func1 Modifier and Type Field Description (package private) Func1<? super Observable<? extends java.lang.Void>,? extends Observable<?>>
InternalObservableUtils.RepeatNotificationDematerializer. notificationHandler
(package private) Func1<? super Observable<? extends java.lang.Throwable>,? extends Observable<?>>
InternalObservableUtils.RetryNotificationDematerializer. notificationHandler
(package private) Func1<Action0,Subscription>
ScalarSynchronousObservable.ScalarAsyncOnSubscribe. onSchedule
(package private) Func1<Action0,Subscription>
ScalarSynchronousObservable.ScalarAsyncProducer. onSchedule
(package private) Func1<? super Observable<T>,? extends Observable<R>>
InternalObservableUtils.SelectorAndObserveOn. selector
Methods in rx.internal.util that return Func1 Modifier and Type Method Description static <T> Func1<? super T,java.lang.Boolean>
UtilityFunctions. alwaysFalse()
Returns a function that always returnsfalse
.static <T> Func1<? super T,java.lang.Boolean>
UtilityFunctions. alwaysTrue()
Returns a function that always returnstrue
.static Func1<Observable<? extends Notification<?>>,Observable<?>>
InternalObservableUtils. createRepeatDematerializer(Func1<? super Observable<? extends java.lang.Void>,? extends Observable<?>> notificationHandler)
Returns a function that dematerializes the notification signal from an Observable and calls a notification handler with a null for non-terminal events.static <T,R>
Func1<Observable<T>,Observable<R>>InternalObservableUtils. createReplaySelectorAndObserveOn(Func1<? super Observable<T>,? extends Observable<R>> selector, Scheduler scheduler)
Creates a Func1 which calls the selector function with the received argument, applies an observeOn on the result and returns the resulting Observable.static Func1<Observable<? extends Notification<?>>,Observable<?>>
InternalObservableUtils. createRetryDematerializer(Func1<? super Observable<? extends java.lang.Throwable>,? extends Observable<?>> notificationHandler)
Returns a function that dematerializes the notification signal from an Observable and calls a notification handler with the Throwable.static Func1<java.lang.Object,java.lang.Boolean>
InternalObservableUtils. equalsWith(java.lang.Object other)
Returns a Func1 that checks if its argument is null-safe equals with the given constant reference.static <T> Func1<T,T>
UtilityFunctions. identity()
Returns a function that always returns the Object it is passed.static Func1<java.lang.Object,java.lang.Boolean>
InternalObservableUtils. isInstanceOf(java.lang.Class<?> clazz)
Returns a Func1 that checks if its argument is an instance of the supplied class.Methods in rx.internal.util with parameters of type Func1 Modifier and Type Method Description static Func1<Observable<? extends Notification<?>>,Observable<?>>
InternalObservableUtils. createRepeatDematerializer(Func1<? super Observable<? extends java.lang.Void>,? extends Observable<?>> notificationHandler)
Returns a function that dematerializes the notification signal from an Observable and calls a notification handler with a null for non-terminal events.static <T,R>
Func1<Observable<T>,Observable<R>>InternalObservableUtils. createReplaySelectorAndObserveOn(Func1<? super Observable<T>,? extends Observable<R>> selector, Scheduler scheduler)
Creates a Func1 which calls the selector function with the received argument, applies an observeOn on the result and returns the resulting Observable.static Func1<Observable<? extends Notification<?>>,Observable<?>>
InternalObservableUtils. createRetryDematerializer(Func1<? super Observable<? extends java.lang.Throwable>,? extends Observable<?>> notificationHandler)
Returns a function that dematerializes the notification signal from an Observable and calls a notification handler with the Throwable.int
IndexedRingBuffer. forEach(Func1<? super E,java.lang.Boolean> action)
int
IndexedRingBuffer. forEach(Func1<? super E,java.lang.Boolean> action, int startIndex)
Loop through each element in the buffer and call a specific function.private int
IndexedRingBuffer. forEach(Func1<? super E,java.lang.Boolean> action, int startIndex, int endIndex)
<R> Observable<R>
ScalarSynchronousObservable. scalarFlatMap(Func1<? super T,? extends Observable<? extends R>> func)
Given this scalar source as input to a flatMap, avoid one step of subscription and subscribes to the single Observable returned by the function.<R> Single<R>
ScalarSynchronousSingle. scalarFlatMap(Func1<? super T,? extends Single<? extends R>> func)
Constructors in rx.internal.util with parameters of type Func1 Constructor Description RepeatNotificationDematerializer(Func1<? super Observable<? extends java.lang.Void>,? extends Observable<?>> notificationHandler)
RetryNotificationDematerializer(Func1<? super Observable<? extends java.lang.Throwable>,? extends Observable<?>> notificationHandler)
ScalarAsyncOnSubscribe(T value, Func1<Action0,Subscription> onSchedule)
ScalarAsyncProducer(Subscriber<? super T> actual, T value, Func1<Action0,Subscription> onSchedule)
SelectorAndObserveOn(Func1<? super Observable<T>,? extends Observable<R>> selector, Scheduler scheduler)
-
Uses of Func1 in rx.observables
Methods in rx.observables with parameters of type Func1 Modifier and Type Method Description T
BlockingObservable. first(Func1<? super T,java.lang.Boolean> predicate)
Returns the first item emitted by thisBlockingObservable
that matches a predicate, or throwsNoSuchElementException
if it emits no such item.T
BlockingObservable. firstOrDefault(T defaultValue, Func1<? super T,java.lang.Boolean> predicate)
Returns the first item emitted by thisBlockingObservable
that matches a predicate, or a default value if it emits no such items.T
BlockingObservable. last(Func1<? super T,java.lang.Boolean> predicate)
Returns the last item emitted by thisBlockingObservable
that matches a predicate, or throwsNoSuchElementException
if it emits no such items.T
BlockingObservable. lastOrDefault(T defaultValue, Func1<? super T,java.lang.Boolean> predicate)
Returns the last item emitted by thisBlockingObservable
that matches a predicate, or a default value if it emits no such items.T
BlockingObservable. single(Func1<? super T,java.lang.Boolean> predicate)
If thisBlockingObservable
completes after emitting a single item that matches a given predicate, return that item, otherwise throw aNoSuchElementException
.T
BlockingObservable. singleOrDefault(T defaultValue, Func1<? super T,java.lang.Boolean> predicate)
If thisBlockingObservable
completes after emitting a single item that matches a predicate, return that item; if it emits more than one such item, throw anIllegalArgumentException
; if it emits no items, return a default value. -
Uses of Func1 in rx.plugins
Fields in rx.plugins declared as Func1 Modifier and Type Field Description (package private) static Func1<Completable.CompletableOnSubscribe,Completable.CompletableOnSubscribe>
RxJavaHooks. onCompletableCreate
(package private) static Func1<Completable.CompletableOperator,Completable.CompletableOperator>
RxJavaHooks. onCompletableLift
(package private) static Func1<java.lang.Throwable,java.lang.Throwable>
RxJavaHooks. onCompletableSubscribeError
(package private) static Func1<Scheduler,Scheduler>
RxJavaHooks. onComputationScheduler
(package private) static Func1<Scheduler,Scheduler>
RxJavaHooks. onIOScheduler
(package private) static Func1<Scheduler,Scheduler>
RxJavaHooks. onNewThreadScheduler
(package private) static Func1<Observable.OnSubscribe,Observable.OnSubscribe>
RxJavaHooks. onObservableCreate
(package private) static Func1<Observable.Operator,Observable.Operator>
RxJavaHooks. onObservableLift
(package private) static Func1<Subscription,Subscription>
RxJavaHooks. onObservableReturn
(package private) static Func1<java.lang.Throwable,java.lang.Throwable>
RxJavaHooks. onObservableSubscribeError
(package private) static Func1<Action0,Action0>
RxJavaHooks. onScheduleAction
(package private) static Func1<Single.OnSubscribe,Single.OnSubscribe>
RxJavaHooks. onSingleCreate
(package private) static Func1<Observable.Operator,Observable.Operator>
RxJavaHooks. onSingleLift
(package private) static Func1<Subscription,Subscription>
RxJavaHooks. onSingleReturn
(package private) static Func1<java.lang.Throwable,java.lang.Throwable>
RxJavaHooks. onSingleSubscribeError
Methods in rx.plugins that return Func1 Modifier and Type Method 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<java.lang.Throwable,java.lang.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<java.lang.Throwable,java.lang.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<java.lang.Throwable,java.lang.Throwable>
RxJavaHooks. getOnSingleSubscribeError()
Returns the current Single onSubscribeError hook function or null if it is set to the default pass-through.Methods in rx.plugins with parameters of type Func1 Modifier and Type Method 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<java.lang.Throwable,java.lang.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<java.lang.Throwable,java.lang.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<java.lang.Throwable,java.lang.Throwable> onSingleSubscribeError)
Sets a hook function that is called when the Single.subscribe() call fails with an exception.
-