javaslang.Patterns Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaslang Show documentation
Show all versions of javaslang Show documentation
Javaslang is a Java standard library extension built for Java 8 and above.
package javaslang;
import javaslang.API.Match.Pattern;
import javaslang.API.Match.Pattern0;
import javaslang.API.Match.Pattern1;
import javaslang.API.Match.Pattern2;
import javaslang.API.Match.Pattern3;
import javaslang.API.Match.Pattern4;
import javaslang.API.Match.Pattern5;
import javaslang.API.Match.Pattern6;
import javaslang.API.Match.Pattern7;
import javaslang.API.Match.Pattern8;
import javaslang.collection.List;
import javaslang.collection.Stream;
import javaslang.concurrent.Future;
import javaslang.control.Either;
import javaslang.control.Option;
import javaslang.control.Try;
import javaslang.control.Validation;
// GENERATED BY JAVASLANG <<>> derived from javaslang.$
public final class Patterns {
private Patterns() {
}
public static final Pattern0 Tuple0 = Pattern0.of(Tuple0.class);
public static Pattern1, _1> Tuple1(Pattern<_1, ?> p1) {
return Pattern1.of(Tuple1.class, p1, javaslang.$::Tuple1);
}
public static Pattern2, _1, _2> Tuple2(Pattern<_1, ?> p1, Pattern<_2, ?> p2) {
return Pattern2.of(Tuple2.class, p1, p2, javaslang.$::Tuple2);
}
public static Pattern3, _1, _2, _3> Tuple3(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3) {
return Pattern3.of(Tuple3.class, p1, p2, p3, javaslang.$::Tuple3);
}
public static Pattern4, _1, _2, _3, _4> Tuple4(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4) {
return Pattern4.of(Tuple4.class, p1, p2, p3, p4, javaslang.$::Tuple4);
}
public static Pattern5, _1, _2, _3, _4, _5> Tuple5(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5) {
return Pattern5.of(Tuple5.class, p1, p2, p3, p4, p5, javaslang.$::Tuple5);
}
public static Pattern6, _1, _2, _3, _4, _5, _6> Tuple6(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5, Pattern<_6, ?> p6) {
return Pattern6.of(Tuple6.class, p1, p2, p3, p4, p5, p6, javaslang.$::Tuple6);
}
public static Pattern7, _1, _2, _3, _4, _5, _6, _7> Tuple7(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5, Pattern<_6, ?> p6, Pattern<_7, ?> p7) {
return Pattern7.of(Tuple7.class, p1, p2, p3, p4, p5, p6, p7, javaslang.$::Tuple7);
}
public static Pattern8, _1, _2, _3, _4, _5, _6, _7, _8> Tuple8(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5, Pattern<_6, ?> p6, Pattern<_7, ?> p7, Pattern<_8, ?> p8) {
return Pattern8.of(Tuple8.class, p1, p2, p3, p4, p5, p6, p7, p8, javaslang.$::Tuple8);
}
public static > Pattern2, _1, _2> List(Pattern<_1, ?> p1, Pattern<_2, ?> p2) {
return Pattern2.of(List.Cons.class, p1, p2, javaslang.$::List);
}
public static Pattern0> List() {
return Pattern0.of(List.Nil.class);
}
public static > Pattern2, _1, _2> Stream(Pattern<_1, ?> p1, Pattern<_2, ?> p2) {
return Pattern2.of(Stream.Cons.class, p1, p2, javaslang.$::Stream);
}
public static Pattern0> Stream() {
return Pattern0.of(Stream.Empty.class);
}
public static >> Pattern1, _1> Future(Pattern<_1, ?> p1) {
return Pattern1.of(Future.class, p1, javaslang.$::Future);
}
public static Pattern1, _1> Right(Pattern<_1, ?> p1) {
return Pattern1.of(Either.Right.class, p1, javaslang.$::Right);
}
public static Pattern1, _1> Left(Pattern<_1, ?> p1) {
return Pattern1.of(Either.Left.class, p1, javaslang.$::Left);
}
public static Pattern1, _1> Some(Pattern<_1, ?> p1) {
return Pattern1.of(Option.Some.class, p1, javaslang.$::Some);
}
public static Pattern0> None() {
return Pattern0.of(Option.None.class);
}
public static Pattern1, _1> Success(Pattern<_1, ?> p1) {
return Pattern1.of(Try.Success.class, p1, javaslang.$::Success);
}
public static Pattern1, _1> Failure(Pattern<_1, ?> p1) {
return Pattern1.of(Try.Failure.class, p1, javaslang.$::Failure);
}
public static Pattern1, _1> Valid(Pattern<_1, ?> p1) {
return Pattern1.of(Validation.Valid.class, p1, javaslang.$::Valid);
}
public static Pattern1, _1> Invalid(Pattern<_1, ?> p1) {
return Pattern1.of(Validation.Invalid.class, p1, javaslang.$::Invalid);
}
}