Package hu.akarnokd.rxjava3.joins
Class JoinObservable<T>
- java.lang.Object
-
- hu.akarnokd.rxjava3.joins.JoinObservable<T>
-
- Type Parameters:
T- the value type joined
public final class JoinObservable<T> extends java.lang.ObjectRepresents an observable that supports join operations.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T2> Pattern2<T,T2>and(Observable<T2> right)Returns a Pattern that matches when both Observables emit an item.static <T> JoinObservable<T>from(Observable<T> o)Creates a JoinObservable from a regular Observable.<R> Plan<R>then(Function<? super T,? extends R> selector)Matches when the Observable has an available item and projects the item by invoking the selector function.Observable<T>toObservable()static <R> JoinObservable<R>when(Plan<R> p1)Joins the results from a pattern via its plan.static <R> JoinObservable<R>when(Plan<R>... plans)Joins together the results from several patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2)Joins together the results from two patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3)Joins together the results from three patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4)Joins together the results from four patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5)Joins together the results from five patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6)Joins together the results from six patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6, Plan<R> p7)Joins together the results from seven patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6, Plan<R> p7, Plan<R> p8)Joins together the results from eight patterns via their plans.static <R> JoinObservable<R>when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6, Plan<R> p7, Plan<R> p8, Plan<R> p9)Joins together the results from nine patterns via their plans.static <R> JoinObservable<R>when(java.lang.Iterable<? extends Plan<R>> plans)Joins together the results from several patterns via their plans.
-
-
-
Method Detail
-
from
public static <T> JoinObservable<T> from(Observable<T> o)
Creates a JoinObservable from a regular Observable.- Type Parameters:
T- the value type- Parameters:
o- the observable to wrap- Returns:
- the created JoinObservable instance
-
and
public <T2> Pattern2<T,T2> and(Observable<T2> right)
Returns a Pattern that matches when both Observables emit an item.
- Type Parameters:
T2- the value type of the right Observable- Parameters:
right- an Observable to match with the source Observable- Returns:
- a Pattern object that matches when both Observables emit an item
- Throws:
java.lang.NullPointerException- ifrightis null- See Also:
- RxJava Wiki: and(), MSDN: Observable.And
-
when
public static <R> JoinObservable<R> when(java.lang.Iterable<? extends Plan<R>> plans)
Joins together the results from several patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
plans- a series of plans created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on patterns- Returns:
- an Observable that emits the results from matching several patterns
- Throws:
java.lang.NullPointerException- ifplansis null- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
@SafeVarargs public static <R> JoinObservable<R> when(Plan<R>... plans)
Joins together the results from several patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
plans- a series of plans created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on patterns- Returns:
- an Observable that emits the results from matching several patterns
- Throws:
java.lang.NullPointerException- ifplansis null- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1)
Joins the results from a pattern via its plan.
- Type Parameters:
R- the result type- Parameters:
p1- the plan to join, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching a pattern
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2)
Joins together the results from two patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching two patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3)
Joins together the results from three patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching three patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4)
Joins together the results from four patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp4- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching four patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5)
Joins together the results from five patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp4- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp5- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching five patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6)
Joins together the results from six patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp4- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp5- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp6- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching six patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6, Plan<R> p7)
Joins together the results from seven patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp4- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp5- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp6- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp7- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching seven patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6, Plan<R> p7, Plan<R> p8)
Joins together the results from eight patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp4- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp5- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp6- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp7- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp8- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching eight patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
when
public static <R> JoinObservable<R> when(Plan<R> p1, Plan<R> p2, Plan<R> p3, Plan<R> p4, Plan<R> p5, Plan<R> p6, Plan<R> p7, Plan<R> p8, Plan<R> p9)
Joins together the results from nine patterns via their plans.
- Type Parameters:
R- the result type- Parameters:
p1- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp2- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp3- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp4- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp5- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp6- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp7- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp8- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a patternp9- a plan, created by use of thethen(io.reactivex.rxjava3.functions.Function<? super T, ? extends R>)Observer on a pattern- Returns:
- an Observable that emits the results from matching nine patterns
- See Also:
- RxJava Wiki: when(), MSDN: Observable.When
-
then
public <R> Plan<R> then(Function<? super T,? extends R> selector)
Matches when the Observable has an available item and projects the item by invoking the selector function.
- Type Parameters:
R- the result type- Parameters:
selector- selector that will be invoked for items emitted by the source Observable- Returns:
- a
Planthat produces the projected results, to be fed (with other Plans) to thewhen(java.lang.Iterable<? extends hu.akarnokd.rxjava3.joins.Plan<R>>)Observer - Throws:
java.lang.NullPointerException- ifselectoris null- See Also:
- RxJava Wiki: then(), MSDN: Observable.Then
-
toObservable
public Observable<T> toObservable()
-
-