Package hu.akarnokd.rxjava3.joins
Class Pattern2<T1,T2>
- java.lang.Object
-
- hu.akarnokd.rxjava3.joins.Pattern2<T1,T2>
-
- Type Parameters:
T1- the first value typeT2- the second value type
public final class Pattern2<T1,T2> extends java.lang.ObjectRepresents a join pattern over observable sequences.
-
-
Constructor Summary
Constructors Constructor Description Pattern2(Observable<T1> o1, Observable<T2> o2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T3> Pattern3<T1,T2,T3>and(Observable<T3> other)Creates a pattern that matches when all three observable sequences have an available element.<R> Plan<R>then(BiFunction<T1,T2,R> selector)Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
-
-
-
Constructor Detail
-
Pattern2
public Pattern2(Observable<T1> o1, Observable<T2> o2)
-
-
Method Detail
-
and
public <T3> Pattern3<T1,T2,T3> and(Observable<T3> other)
Creates a pattern that matches when all three observable sequences have an available element.- Type Parameters:
T3- the value type of the extra Observable- Parameters:
other- Observable sequence to match with the two previous sequences.- Returns:
- Pattern object that matches when all observable sequences have an available element.
-
then
public <R> Plan<R> then(BiFunction<T1,T2,R> selector)
Matches when all observable sequences have an available element and projects the elements by invoking the selector function.- Type Parameters:
R- the result type- Parameters:
selector- the function that will be invoked for elements in the source sequences.- Returns:
- the plan for the matching
- Throws:
java.lang.NullPointerException- if selector is null
-
-