hu.akarnokd.rxjava2.joins

## Class JoinObservable<T>

- java.lang.Object
- - hu.akarnokd.rxjava2.joins.JoinObservable<T>

Type Parameters:
  `T` - the value type joined

    public final class JoinObservable<T>
    extends java.lang.Object

Represents an observable that supports join operations.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`<T2> Pattern2<T,T2>` `and(io.reactivex.Observable<T2> right)` Returns a Pattern that matches when both Observables emit an item.
`static <T> JoinObservable<T>` `from(io.reactivex.Observable<T> o)` Creates a JoinObservable from a regular Observable.
`<R> Plan<R>` `then(io.reactivex.functions.Function<? super T,? extends R> selector)` Matches when the Observable has an available item and projects the item by invoking the selector function.
`io.reactivex.Observable<T>` `toObservable()`
`static <R> JoinObservable<R>` `when(java.lang.Iterable<? extends Plan<R>> plans)` Joins together the results from several patterns via their plans.
`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)` Joins the results from a pattern via its plan.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### from

    public static <T> JoinObservable<T> from(io.reactivex.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(io.reactivex.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` - if `right` is 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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on patterns
Returns:
  an Observable that emits the results from matching several patterns
Throws:
  `java.lang.NullPointerException` - if `plans` is null
See Also:
  RxJava Wiki: when(), MSDN: Observable.When

#### when

    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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on patterns
Returns:
  an Observable that emits the results from matching several patterns
Throws:
  `java.lang.NullPointerException` - if `plans` is 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 the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p4` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p4` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p5` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p4` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p5` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p6` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p4` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p5` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p6` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p7` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p4` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p5` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p6` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p7` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p8` - a plan, created by use of the `then(io.reactivex.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 the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p2` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p3` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p4` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p5` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p6` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p7` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p8` - a plan, created by use of the `then(io.reactivex.functions.Function<? super T, ? extends R>)` Observer on a pattern
  `p9` - a plan, created by use of the `then(io.reactivex.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(io.reactivex.functions.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 `Plan` that produces the projected results, to be fed (with other Plans) to the `when(java.lang.Iterable<? extends hu.akarnokd.rxjava2.joins.Plan<R>>)` Observer
Throws:
  `java.lang.NullPointerException` - if `selector` is null
See Also:
  RxJava Wiki: then(), MSDN: Observable.Then

#### toObservable

    public io.reactivex.Observable<T> toObservable()