Uses of Interface
rx.functions.Func2
-
Packages that use Func2 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 Func2 in rx
Methods in rx with parameters of type Func2 Modifier and Type Method Description static <T1,T2,R>
Observable<R>Observable. combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Func2<? super T1,? super T2,? extends R> combineFunction)
Combines two source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from either of the source Observables, where this aggregation is defined by a specified function.Observable<T>
Observable. distinctUntilChanged(Func2<? super T,? super T,java.lang.Boolean> comparator)
Returns an Observable that emits all items emitted by the source Observable that are distinct from their immediate predecessors when compared with each other via the provided comparator function.<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.<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.<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.<R> Observable<R>
Observable. reduce(R initialValue, Func2<R,? super T,R> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source Observable and a specified seed value, 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 final result from the final call to your function as its sole item.Observable<T>
Observable. reduce(Func2<T,T,T> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, and emits the final result from the final call to your function as its sole item.Completable
Completable. retry(Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean> predicate)
Returns a Completable that retries this Completable in case of an error as long as the predicate returns true.Observable<T>
Observable. retry(Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean> predicate)
Returns an Observable that mirrors the source Observable, resubscribing to it if it callsonError
and the predicate returns true for that specific exception and retry count.Single<T>
Single. retry(Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean> predicate)
Returns an Single that mirrors the source Single, resubscribing to it if it callsonError
and the predicate returns true for that specific exception and retry count.<R> Observable<R>
Observable. scan(R initialValue, Func2<R,? super T,R> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source Observable and a seed value, then feeds the result of that function along with the second item emitted by the source 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.Observable<T>
Observable. scan(Func2<T,T,T> accumulator)
Returns an Observable that applies a specified accumulator function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source 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.static <T> Observable<java.lang.Boolean>
Observable. sequenceEqual(Observable<? extends T> first, Observable<? extends T> second, Func2<? super T,? super T,java.lang.Boolean> equality)
Returns an Observable that emits a Boolean value that indicates whether two Observable sequences are the same by comparing the items emitted by each Observable pairwise based on the results of a specified equality function.Observable<java.util.List<T>>
Observable. toSortedList(Func2<? super T,? super T,java.lang.Integer> sortFunction)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order based on a specified comparison function.Observable<java.util.List<T>>
Observable. toSortedList(Func2<? super T,? super T,java.lang.Integer> sortFunction, int initialCapacity)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a sorted order based on a specified comparison function.<U,R>
Observable<R>Observable. withLatestFrom(Observable<? extends U> other, Func2<? super T,? super U,? extends R> resultSelector)
Merges the specified Observable into this Observable sequence by using theresultSelector
function only when the source Observable (this instance) emits an item.static <T1,T2,R>
Observable<R>Observable. zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Func2<? super T1,? super T2,? extends R> zipFunction)
Returns an Observable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other Observables.static <T1,T2,R>
Single<R>Single. zip(Single<? extends T1> s1, Single<? extends T2> s2, Func2<? super T1,? super T2,? extends R> zipFunction)
Returns a Single that emits the results of a specified combiner function applied to two items emitted by two other Singles.<T2,R>
Observable<R>Observable. zipWith(java.lang.Iterable<? extends T2> other, Func2<? super T,? super T2,? extends R> zipFunction)
Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and a specified Iterable sequence.<T2,R>
Observable<R>Observable. zipWith(Observable<? extends T2> other, Func2<? super T,? super T2,? extends R> zipFunction)
Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source Observable and another specified Observable.<T2,R>
Single<R>Single. zipWith(Single<? extends T2> other, Func2<? super T,? super T2,? extends R> zipFunction)
Returns a Single that emits the result of applying a specified function to the pair of items emitted by the source Single and another specified Single. -
Uses of Func2 in rx.functions
Methods in rx.functions that return Func2 Modifier and Type Method Description static <T1,T2>
Func2<T1,T2,java.lang.Void>Actions. toFunc(Action2<T1,T2> action)
Converts anAction2
to a function that calls the action and returnsnull
.static <T1,T2,R>
Func2<T1,T2,R>Actions. toFunc(Action2<T1,T2> action, R result)
Converts anAction2
to a function that calls the action and returns a specified value.Methods in rx.functions with parameters of type Func2 Modifier and Type Method Description static <T0,T1,R>
FuncN<R>Functions. fromFunc(Func2<? super T0,? super T1,? extends R> f)
-
Uses of Func2 in rx.internal.operators
Classes in rx.internal.operators that implement Func2 Modifier and Type Class Description class
OperatorDistinctUntilChanged<T,U>
Returns an Observable that emits all sequentially distinct items emitted by the source.Fields in rx.internal.operators declared as Func2 Modifier and Type Field Description (package private) Func2<R,? super T,R>
OperatorScan. accumulator
(package private) Func2<? super U,? super U,java.lang.Boolean>
OperatorDistinctUntilChanged. comparator
(package private) Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean>
OnSubscribeRedo.RetryWithPredicate. predicate
(package private) Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean>
OperatorRetryWithPredicate. predicate
(package private) Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean>
OperatorRetryWithPredicate.SourceSubscriber. predicate
(package private) Func2<? super T,java.lang.Integer,java.lang.Boolean>
OperatorSkipWhile. predicate
(package private) Func2<? super T,? super java.lang.Integer,java.lang.Boolean>
OperatorTakeWhile. predicate
(package private) Func2<T,T,T>
OnSubscribeReduce. reducer
(package private) Func2<T,T,T>
OnSubscribeReduce.ReduceSubscriber. reducer
(package private) Func2<R,? super T,R>
OnSubscribeReduceSeed. reducer
(package private) Func2<R,? super T,R>
OnSubscribeReduceSeed.ReduceSeedSubscriber. reducer
(package private) Func2<? super T1,? super Observable<T2>,? extends R>
OnSubscribeGroupJoin. resultSelector
(package private) Func2<TLeft,TRight,R>
OnSubscribeJoin. resultSelector
(package private) Func2<? super T,? super U,? extends R>
OperatorMapPair.MapPairSubscriber. resultSelector
(package private) Func2<? super T,? super U,? extends R>
OperatorMapPair.OuterInnerMapper. resultSelector
(package private) Func2<? super T,? super U,? extends R>
OperatorMapPair. resultSelector
(package private) Func2<? super T,? super U,? extends R>
OperatorWithLatestFrom. resultSelector
(package private) Func2<? super T1,? super T2,? extends R>
OperatorZipIterable. zipFunction
Methods in rx.internal.operators that return Func2 Modifier and Type Method Description static <T> Func2<T,java.lang.Integer,java.lang.Boolean>
OperatorSkipWhile. toPredicate2(Func1<? super T,java.lang.Boolean> predicate)
Convert to Func2 type predicate.Methods in rx.internal.operators with parameters of type Func2 Modifier and Type Method Description static <T> Observable<java.lang.Boolean>
OperatorSequenceEqual. sequenceEqual(Observable<? extends T> first, Observable<? extends T> second, Func2<? super T,? super T,java.lang.Boolean> equality)
Tests whether twoObservable
sequences are identical, emittingtrue
if both sequences complete without differing, andfalse
if the two sequences diverge at any point.Constructors in rx.internal.operators with parameters of type Func2 Constructor Description MapPairSubscriber(Subscriber<? super Observable<? extends R>> actual, Func1<? super T,? extends Observable<? extends U>> collectionSelector, Func2<? super T,? super U,? extends R> resultSelector)
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)
OnSubscribeReduce(Observable<T> source, Func2<T,T,T> reducer)
OnSubscribeReduceSeed(Observable<T> source, R initialValue, Func2<R,? super T,R> reducer)
OperatorDistinctUntilChanged(Func2<? super U,? super U,java.lang.Boolean> comparator)
OperatorMapPair(Func1<? super T,? extends Observable<? extends U>> collectionSelector, Func2<? super T,? super U,? extends R> resultSelector)
OperatorRetryWithPredicate(Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean> predicate)
OperatorScan(R initialValue, Func2<R,? super T,R> accumulator)
Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source and accumulator.OperatorScan(Func0<R> initialValueFactory, Func2<R,? super T,R> accumulator)
OperatorScan(Func2<R,? super T,R> accumulator)
Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source and accumulator.OperatorSkipWhile(Func2<? super T,java.lang.Integer,java.lang.Boolean> predicate)
OperatorTakeWhile(Func2<? super T,? super java.lang.Integer,java.lang.Boolean> predicate)
OperatorToObservableSortedList(Func2<? super T,? super T,java.lang.Integer> sortFunction, int initialCapacity)
OperatorWithLatestFrom(Observable<? extends U> other, Func2<? super T,? super U,? extends R> resultSelector)
OperatorZip(Func2 f)
OperatorZipIterable(java.lang.Iterable<? extends T2> iterable, Func2<? super T1,? super T2,? extends R> zipFunction)
OuterInnerMapper(T outer, Func2<? super T,? super U,? extends R> resultSelector)
ReduceSeedSubscriber(Subscriber<? super R> actual, R initialValue, Func2<R,? super T,R> reducer)
ReduceSubscriber(Subscriber<? super T> actual, Func2<T,T,T> reducer)
RetryWithPredicate(Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean> predicate)
SourceSubscriber(Subscriber<? super T> child, Func2<java.lang.Integer,java.lang.Throwable,java.lang.Boolean> predicate, Scheduler.Worker inner, SerialSubscription serialSubscription, ProducerArbiter pa)
-
Uses of Func2 in rx.internal.util
Classes in rx.internal.util that implement Func2 Modifier and Type Class Description (package private) static class
InternalObservableUtils.CollectorCaller<T,R>
(package private) static class
InternalObservableUtils.ObjectEqualsFunc2
(package private) static class
InternalObservableUtils.PlusOneFunc2
(package private) static class
InternalObservableUtils.PlusOneLongFunc2
Methods in rx.internal.util that return Func2 Modifier and Type Method Description static <T,R>
Func2<R,T,R>InternalObservableUtils. createCollectorCaller(Action2<R,? super T> collector)
Returns a Func2 which calls a collector with its parameters and returns the first (R) parameter. -
Uses of Func2 in rx.observables
Fields in rx.observables declared as Func2 Modifier and Type Field Description private Func2<? super S,? super Observer<? super T>,? extends S>
SyncOnSubscribe.SyncOnSubscribeImpl. next
Methods in rx.observables with parameters of type Func2 Modifier and Type Method Description 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 Func2 Constructor Description 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)
SyncOnSubscribeImpl(Func2<S,Observer<? super T>,S> nextFunc)
SyncOnSubscribeImpl(Func2<S,Observer<? super T>,S> next, Action1<? super S> onUnsubscribe)
-
Uses of Func2 in rx.plugins
Fields in rx.plugins declared as Func2 Modifier and Type Field Description (package private) static Func2<Completable,Completable.CompletableOnSubscribe,Completable.CompletableOnSubscribe>
RxJavaHooks. onCompletableStart
(package private) static Func2<Observable,Observable.OnSubscribe,Observable.OnSubscribe>
RxJavaHooks. onObservableStart
(package private) static Func2<Single,Observable.OnSubscribe,Observable.OnSubscribe>
RxJavaHooks. onSingleStart
Methods in rx.plugins that return Func2 Modifier and Type Method Description static Func2<Completable,Completable.CompletableOnSubscribe,Completable.CompletableOnSubscribe>
RxJavaHooks. getOnCompletableStart()
Returns the current Completable onStart hook function or null if it is set to the default pass-through.static Func2<Observable,Observable.OnSubscribe,Observable.OnSubscribe>
RxJavaHooks. getOnObservableStart()
Returns the current Observable onStart hook function or null if it is set to the default pass-through.static Func2<Single,Observable.OnSubscribe,Observable.OnSubscribe>
RxJavaHooks. getOnSingleStart()
Returns the current Single onStart hook function or null if it is set to the default pass-through.Methods in rx.plugins with parameters of type Func2 Modifier and Type Method Description static void
RxJavaHooks. setOnCompletableStart(Func2<Completable,Completable.CompletableOnSubscribe,Completable.CompletableOnSubscribe> onCompletableStart)
Sets the hook function that is called when a subscriber subscribes to a Completable unless a lockdown is in effect.static void
RxJavaHooks. setOnObservableStart(Func2<Observable,Observable.OnSubscribe,Observable.OnSubscribe> onObservableStart)
Sets the hook function that is called when a subscriber subscribes to a Observable unless a lockdown is in effect.static void
RxJavaHooks. setOnSingleStart(Func2<Single,Observable.OnSubscribe,Observable.OnSubscribe> onSingleStart)
Sets the hook function that is called when a subscriber subscribes to a Single unless a lockdown is in effect.
-