Package io.vavr
Class API.Match.Pattern2<T,T1,T2>
- java.lang.Object
-
- io.vavr.API.Match.Pattern2<T,T1,T2>
-
- Type Parameters:
T- Class type that is matched by this patternT1- Member type 1 of the composite part this pattern decomposesT2- Member type 2 of the composite part this pattern decomposes
- All Implemented Interfaces:
API.Match.Pattern<T,Tuple2<T1,T2>>,Function1<T,Tuple2<T1,T2>>,PartialFunction<T,Tuple2<T1,T2>>,java.io.Serializable,java.util.function.Function<T,Tuple2<T1,T2>>
public abstract static class API.Match.Pattern2<T,T1,T2> extends java.lang.Object implements API.Match.Pattern<T,Tuple2<T1,T2>>
AAPI.Match.Patternimplementation for the pattern with 2 intermediate types- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDThe serial version UID for serialization.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPattern2()Creates a newPattern2.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,T1 extends U1,U1,T2 extends U2,U2>
API.Match.Pattern2<T,T1,T2>of(@NonNull java.lang.Class<? super T> type, @NonNull API.Match.Pattern<T1,?> p1, @NonNull API.Match.Pattern<T2,?> p2, @NonNull java.util.function.Function<T,Tuple2<U1,U2>> unapply)Static factory for aAPI.Match.Pattern2based on aClass, 2API.Match.Patterns to decompose it to and a mapper to aggregate result back into aTuple2-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.vavr.Function1
andThen, arity, compose, compose1, curried, isMemoized, memoized, partial, reversed, tupled
-
Methods inherited from interface io.vavr.PartialFunction
apply, isDefinedAt, lift
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serial version UID for serialization.- See Also:
- Constant Field Values
-
-
Method Detail
-
of
public static <T,T1 extends U1,U1,T2 extends U2,U2> API.Match.Pattern2<T,T1,T2> of(@NonNull java.lang.Class<? super T> type, @NonNull API.Match.Pattern<T1,?> p1, @NonNull API.Match.Pattern<T2,?> p2, @NonNull java.util.function.Function<T,Tuple2<U1,U2>> unapply)
Static factory for aAPI.Match.Pattern2based on aClass, 2API.Match.Patterns to decompose it to and a mapper to aggregate result back into aTuple2- Type Parameters:
T- Class type matched by this patternT1- Member type 1 of the composite part this pattern decomposesU1- Member type 1 of the Tuple the composite part of this pattern decomposes toT2- Member type 2 of the composite part this pattern decomposesU2- Member type 2 of the Tuple the composite part of this pattern decomposes to- Parameters:
type-Classto build the pattern fromp1-API.Match.Patternmatching the intermediate type 1p2-API.Match.Patternmatching the intermediate type 2unapply- Mapper function from T to aTuple2- Returns:
- new Pattern2
-
-