public final class API
extends java.lang.Object
import static io.vavr.API.*;
The For
-comprehension is syntactic sugar for nested for-loops. We write
// lazily evaluated
Iterator<R> result = For(iterable1, iterable2, ..., iterableN).yield(f);
or
Iterator<R> result =
For(iterable1, v1 ->
For(iterable2, v2 ->
...
For(iterableN).yield(vN -> f.apply(v1, v2, ..., vN))
)
);
instead of
for(T1 v1 : iterable1) {
for (T2 v2 : iterable2) {
...
for (TN vN : iterableN) {
R result = f.apply(v1, v2, ..., VN);
//
// We are forced to perform side effects to do s.th. meaningful with the result.
//
}
}
}
Please note that values like Option, Try, Future, etc. are also iterable.
Given a suitable function
f: (v1, v2, ..., vN) -> ...
and 1 <= N <= 8 iterables, the result is a Stream of the
mapped cross product elements.
{ f(v1, v2, ..., vN) | v1 ∈ iterable1, ... vN ∈ iterableN }
As with all Vavr Values, the result of a For-comprehension can be converted
to standard Java library and Vavr types.Modifier and Type | Class and Description |
---|---|
static class |
API.For1<T1>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For1Either<L,T1>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For1Future<T1>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For1List<T1>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For1Option<T1>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For1Try<T1>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For2<T1,T2>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For2Either<L,T1,T2>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For2Future<T1,T2>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For2List<T1,T2>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For2Option<T1,T2>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For2Try<T1,T2>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For3<T1,T2,T3>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For3Either<L,T1,T2,T3>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For3Future<T1,T2,T3>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For3List<T1,T2,T3>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For3Option<T1,T2,T3>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For3Try<T1,T2,T3>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For4<T1,T2,T3,T4>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For4Either<L,T1,T2,T3,T4>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For4Future<T1,T2,T3,T4>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For4List<T1,T2,T3,T4>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For4Option<T1,T2,T3,T4>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For4Try<T1,T2,T3,T4>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For5<T1,T2,T3,T4,T5>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For5Either<L,T1,T2,T3,T4,T5>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For5Future<T1,T2,T3,T4,T5>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For5List<T1,T2,T3,T4,T5>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For5Option<T1,T2,T3,T4,T5>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For5Try<T1,T2,T3,T4,T5>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For6<T1,T2,T3,T4,T5,T6>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For6Either<L,T1,T2,T3,T4,T5,T6>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For6Future<T1,T2,T3,T4,T5,T6>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For6List<T1,T2,T3,T4,T5,T6>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For6Option<T1,T2,T3,T4,T5,T6>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For6Try<T1,T2,T3,T4,T5,T6>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For7<T1,T2,T3,T4,T5,T6,T7>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For7Either<L,T1,T2,T3,T4,T5,T6,T7>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For7Future<T1,T2,T3,T4,T5,T6,T7>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For7List<T1,T2,T3,T4,T5,T6,T7>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For7Option<T1,T2,T3,T4,T5,T6,T7>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For7Try<T1,T2,T3,T4,T5,T6,T7>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For8<T1,T2,T3,T4,T5,T6,T7,T8>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For8Either<L,T1,T2,T3,T4,T5,T6,T7,T8>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For8Future<T1,T2,T3,T4,T5,T6,T7,T8>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For8List<T1,T2,T3,T4,T5,T6,T7,T8>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For8Option<T1,T2,T3,T4,T5,T6,T7,T8>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.For8Try<T1,T2,T3,T4,T5,T6,T7,T8>
Deprecated.
to be replaced with revised JDK13-compliant API
|
static class |
API.Match<T>
Scala-like structural pattern matching for Java.
|
Modifier and Type | Method and Description |
---|---|
static <T> API.Match.Pattern0<T> |
$()
Wildcard pattern, matches any value.
|
static <T> API.Match.Pattern0<T> |
$(java.util.function.Predicate<? super T> predicate)
Guard pattern, checks if a predicate is satisfied.
|
static <T> API.Match.Pattern0<T> |
$(T prototype)
Value pattern, checks for equality.
|
static <T> Array<T> |
Array()
Alias for
Array.empty() |
static <T> Array<T> |
Array(T... elements)
Alias for
Array.of(Object...) |
static <T> Array<T> |
Array(T element)
Alias for
Array.of(Object) |
static <T,R> API.Match.Case<T,R> |
Case(API.Match.Pattern0<T> pattern,
java.util.function.Function<? super T,? extends R> f) |
static <T,R> API.Match.Case<T,R> |
Case(API.Match.Pattern0<T> pattern,
R retVal) |
static <T,R> API.Match.Case<T,R> |
Case(API.Match.Pattern0<T> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,R> API.Match.Case<T,R> |
Case(API.Match.Pattern1<T,T1> pattern,
java.util.function.Function<? super T1,? extends R> f) |
static <T,T1,R> API.Match.Case<T,R> |
Case(API.Match.Pattern1<T,T1> pattern,
R retVal) |
static <T,T1,R> API.Match.Case<T,R> |
Case(API.Match.Pattern1<T,T1> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,R> |
Case(API.Match.Pattern2<T,T1,T2> pattern,
java.util.function.BiFunction<? super T1,? super T2,? extends R> f) |
static <T,T1,T2,R> |
Case(API.Match.Pattern2<T,T1,T2> pattern,
R retVal) |
static <T,T1,T2,R> |
Case(API.Match.Pattern2<T,T1,T2> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,T3,R> |
Case(API.Match.Pattern3<T,T1,T2,T3> pattern,
Function3<? super T1,? super T2,? super T3,? extends R> f) |
static <T,T1,T2,T3,R> |
Case(API.Match.Pattern3<T,T1,T2,T3> pattern,
R retVal) |
static <T,T1,T2,T3,R> |
Case(API.Match.Pattern3<T,T1,T2,T3> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,T3,T4,R> |
Case(API.Match.Pattern4<T,T1,T2,T3,T4> pattern,
Function4<? super T1,? super T2,? super T3,? super T4,? extends R> f) |
static <T,T1,T2,T3,T4,R> |
Case(API.Match.Pattern4<T,T1,T2,T3,T4> pattern,
R retVal) |
static <T,T1,T2,T3,T4,R> |
Case(API.Match.Pattern4<T,T1,T2,T3,T4> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,T3,T4,T5,R> |
Case(API.Match.Pattern5<T,T1,T2,T3,T4,T5> pattern,
Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f) |
static <T,T1,T2,T3,T4,T5,R> |
Case(API.Match.Pattern5<T,T1,T2,T3,T4,T5> pattern,
R retVal) |
static <T,T1,T2,T3,T4,T5,R> |
Case(API.Match.Pattern5<T,T1,T2,T3,T4,T5> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,T3,T4,T5,T6,R> |
Case(API.Match.Pattern6<T,T1,T2,T3,T4,T5,T6> pattern,
Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f) |
static <T,T1,T2,T3,T4,T5,T6,R> |
Case(API.Match.Pattern6<T,T1,T2,T3,T4,T5,T6> pattern,
R retVal) |
static <T,T1,T2,T3,T4,T5,T6,R> |
Case(API.Match.Pattern6<T,T1,T2,T3,T4,T5,T6> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,T3,T4,T5,T6,T7,R> |
Case(API.Match.Pattern7<T,T1,T2,T3,T4,T5,T6,T7> pattern,
Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f) |
static <T,T1,T2,T3,T4,T5,T6,T7,R> |
Case(API.Match.Pattern7<T,T1,T2,T3,T4,T5,T6,T7> pattern,
R retVal) |
static <T,T1,T2,T3,T4,T5,T6,T7,R> |
Case(API.Match.Pattern7<T,T1,T2,T3,T4,T5,T6,T7> pattern,
java.util.function.Supplier<? extends R> supplier) |
static <T,T1,T2,T3,T4,T5,T6,T7,T8,R> |
Case(API.Match.Pattern8<T,T1,T2,T3,T4,T5,T6,T7,T8> pattern,
Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f) |
static <T,T1,T2,T3,T4,T5,T6,T7,T8,R> |
Case(API.Match.Pattern8<T,T1,T2,T3,T4,T5,T6,T7,T8> pattern,
R retVal) |
static <T,T1,T2,T3,T4,T5,T6,T7,T8,R> |
Case(API.Match.Pattern8<T,T1,T2,T3,T4,T5,T6,T7,T8> pattern,
java.util.function.Supplier<? extends R> supplier) |
static CharSeq |
CharSeq(char... characters)
Alias for
CharSeq.of(char...) |
static CharSeq |
CharSeq(char character)
Alias for
CharSeq.of(char) |
static CharSeq |
CharSeq(java.lang.CharSequence sequence)
Alias for
CharSeq.of(CharSequence) |
static <R> CheckedFunction0<R> |
CheckedFunction(CheckedFunction0<R> methodReference)
Alias for
CheckedFunction0.of(CheckedFunction0) |
static <T1,R> CheckedFunction1<T1,R> |
CheckedFunction(CheckedFunction1<T1,R> methodReference)
Alias for
CheckedFunction1.of(CheckedFunction1) |
static <T1,T2,R> CheckedFunction2<T1,T2,R> |
CheckedFunction(CheckedFunction2<T1,T2,R> methodReference)
Alias for
CheckedFunction2.of(CheckedFunction2) |
static <T1,T2,T3,R> |
CheckedFunction(CheckedFunction3<T1,T2,T3,R> methodReference)
Alias for
CheckedFunction3.of(CheckedFunction3) |
static <T1,T2,T3,T4,R> |
CheckedFunction(CheckedFunction4<T1,T2,T3,T4,R> methodReference)
Alias for
CheckedFunction4.of(CheckedFunction4) |
static <T1,T2,T3,T4,T5,R> |
CheckedFunction(CheckedFunction5<T1,T2,T3,T4,T5,R> methodReference)
Alias for
CheckedFunction5.of(CheckedFunction5) |
static <T1,T2,T3,T4,T5,T6,R> |
CheckedFunction(CheckedFunction6<T1,T2,T3,T4,T5,T6,R> methodReference)
Alias for
CheckedFunction6.of(CheckedFunction6) |
static <T1,T2,T3,T4,T5,T6,T7,R> |
CheckedFunction(CheckedFunction7<T1,T2,T3,T4,T5,T6,T7,R> methodReference)
Alias for
CheckedFunction7.of(CheckedFunction7) |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
CheckedFunction(CheckedFunction8<T1,T2,T3,T4,T5,T6,T7,T8,R> methodReference)
Alias for
CheckedFunction8.of(CheckedFunction8) |
static <T> Try<T> |
Failure(java.lang.Throwable exception)
Alias for
Try.failure(Throwable) |
static <L,T1> API.For1Either<L,T1> |
For(Either<L,T1> ts1)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2> API.For2Either<L,T1,T2> |
For(Either<L,T1> ts1,
Either<L,T2> ts2)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2,T3> |
For(Either<L,T1> ts1,
Either<L,T2> ts2,
Either<L,T3> ts3)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2,T3,T4> |
For(Either<L,T1> ts1,
Either<L,T2> ts2,
Either<L,T3> ts3,
Either<L,T4> ts4)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2,T3,T4,T5> |
For(Either<L,T1> ts1,
Either<L,T2> ts2,
Either<L,T3> ts3,
Either<L,T4> ts4,
Either<L,T5> ts5)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2,T3,T4,T5,T6> |
For(Either<L,T1> ts1,
Either<L,T2> ts2,
Either<L,T3> ts3,
Either<L,T4> ts4,
Either<L,T5> ts5,
Either<L,T6> ts6)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2,T3,T4,T5,T6,T7> |
For(Either<L,T1> ts1,
Either<L,T2> ts2,
Either<L,T3> ts3,
Either<L,T4> ts4,
Either<L,T5> ts5,
Either<L,T6> ts6,
Either<L,T7> ts7)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <L,T1,T2,T3,T4,T5,T6,T7,T8> |
For(Either<L,T1> ts1,
Either<L,T2> ts2,
Either<L,T3> ts3,
Either<L,T4> ts4,
Either<L,T5> ts5,
Either<L,T6> ts6,
Either<L,T7> ts7,
Either<L,T8> ts8)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1> API.For1Future<T1> |
For(Future<T1> ts1)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2> API.For2Future<T1,T2> |
For(Future<T1> ts1,
Future<T2> ts2)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3> API.For3Future<T1,T2,T3> |
For(Future<T1> ts1,
Future<T2> ts2,
Future<T3> ts3)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4> |
For(Future<T1> ts1,
Future<T2> ts2,
Future<T3> ts3,
Future<T4> ts4)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5> |
For(Future<T1> ts1,
Future<T2> ts2,
Future<T3> ts3,
Future<T4> ts4,
Future<T5> ts5)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6> |
For(Future<T1> ts1,
Future<T2> ts2,
Future<T3> ts3,
Future<T4> ts4,
Future<T5> ts5,
Future<T6> ts6)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7> |
For(Future<T1> ts1,
Future<T2> ts2,
Future<T3> ts3,
Future<T4> ts4,
Future<T5> ts5,
Future<T6> ts6,
Future<T7> ts7)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
For(Future<T1> ts1,
Future<T2> ts2,
Future<T3> ts3,
Future<T4> ts4,
Future<T5> ts5,
Future<T6> ts6,
Future<T7> ts7,
Future<T8> ts8)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T,U> Iterator<U> |
For(java.lang.Iterable<T> ts,
java.util.function.Function<? super T,? extends java.lang.Iterable<U>> f)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1> API.For1<T1> |
For(java.lang.Iterable<T1> ts1)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2> API.For2<T1,T2> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3> API.For3<T1,T2,T3> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2,
java.lang.Iterable<T3> ts3)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2,
java.lang.Iterable<T3> ts3,
java.lang.Iterable<T4> ts4)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2,
java.lang.Iterable<T3> ts3,
java.lang.Iterable<T4> ts4,
java.lang.Iterable<T5> ts5)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2,
java.lang.Iterable<T3> ts3,
java.lang.Iterable<T4> ts4,
java.lang.Iterable<T5> ts5,
java.lang.Iterable<T6> ts6)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2,
java.lang.Iterable<T3> ts3,
java.lang.Iterable<T4> ts4,
java.lang.Iterable<T5> ts5,
java.lang.Iterable<T6> ts6,
java.lang.Iterable<T7> ts7)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
For(java.lang.Iterable<T1> ts1,
java.lang.Iterable<T2> ts2,
java.lang.Iterable<T3> ts3,
java.lang.Iterable<T4> ts4,
java.lang.Iterable<T5> ts5,
java.lang.Iterable<T6> ts6,
java.lang.Iterable<T7> ts7,
java.lang.Iterable<T8> ts8)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1> API.For1List<T1> |
For(List<T1> ts1)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2> API.For2List<T1,T2> |
For(List<T1> ts1,
List<T2> ts2)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3> API.For3List<T1,T2,T3> |
For(List<T1> ts1,
List<T2> ts2,
List<T3> ts3)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4> |
For(List<T1> ts1,
List<T2> ts2,
List<T3> ts3,
List<T4> ts4)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5> |
For(List<T1> ts1,
List<T2> ts2,
List<T3> ts3,
List<T4> ts4,
List<T5> ts5)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6> |
For(List<T1> ts1,
List<T2> ts2,
List<T3> ts3,
List<T4> ts4,
List<T5> ts5,
List<T6> ts6)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7> |
For(List<T1> ts1,
List<T2> ts2,
List<T3> ts3,
List<T4> ts4,
List<T5> ts5,
List<T6> ts6,
List<T7> ts7)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
For(List<T1> ts1,
List<T2> ts2,
List<T3> ts3,
List<T4> ts4,
List<T5> ts5,
List<T6> ts6,
List<T7> ts7,
List<T8> ts8)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1> API.For1Option<T1> |
For(Option<T1> ts1)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2> API.For2Option<T1,T2> |
For(Option<T1> ts1,
Option<T2> ts2)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3> API.For3Option<T1,T2,T3> |
For(Option<T1> ts1,
Option<T2> ts2,
Option<T3> ts3)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4> |
For(Option<T1> ts1,
Option<T2> ts2,
Option<T3> ts3,
Option<T4> ts4)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5> |
For(Option<T1> ts1,
Option<T2> ts2,
Option<T3> ts3,
Option<T4> ts4,
Option<T5> ts5)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6> |
For(Option<T1> ts1,
Option<T2> ts2,
Option<T3> ts3,
Option<T4> ts4,
Option<T5> ts5,
Option<T6> ts6)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7> |
For(Option<T1> ts1,
Option<T2> ts2,
Option<T3> ts3,
Option<T4> ts4,
Option<T5> ts5,
Option<T6> ts6,
Option<T7> ts7)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
For(Option<T1> ts1,
Option<T2> ts2,
Option<T3> ts3,
Option<T4> ts4,
Option<T5> ts5,
Option<T6> ts6,
Option<T7> ts7,
Option<T8> ts8)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1> API.For1Try<T1> |
For(Try<T1> ts1)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2> API.For2Try<T1,T2> |
For(Try<T1> ts1,
Try<T2> ts2)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3> API.For3Try<T1,T2,T3> |
For(Try<T1> ts1,
Try<T2> ts2,
Try<T3> ts3)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4> |
For(Try<T1> ts1,
Try<T2> ts2,
Try<T3> ts3,
Try<T4> ts4)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5> |
For(Try<T1> ts1,
Try<T2> ts2,
Try<T3> ts3,
Try<T4> ts4,
Try<T5> ts5)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6> |
For(Try<T1> ts1,
Try<T2> ts2,
Try<T3> ts3,
Try<T4> ts4,
Try<T5> ts5,
Try<T6> ts6)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7> |
For(Try<T1> ts1,
Try<T2> ts2,
Try<T3> ts3,
Try<T4> ts4,
Try<T5> ts5,
Try<T6> ts6,
Try<T7> ts7)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <T1,T2,T3,T4,T5,T6,T7,T8> |
For(Try<T1> ts1,
Try<T2> ts2,
Try<T3> ts3,
Try<T4> ts4,
Try<T5> ts5,
Try<T6> ts6,
Try<T7> ts7,
Try<T8> ts8)
Deprecated.
to be replaced with revised JDK13-compliant API
|
static <R> Function0<R> |
Function(Function0<R> methodReference)
Alias for
Function0.of(Function0) |
static <T1,R> Function1<T1,R> |
Function(Function1<T1,R> methodReference)
Alias for
Function1.of(Function1) |
static <T1,T2,R> Function2<T1,T2,R> |
Function(Function2<T1,T2,R> methodReference)
Alias for
Function2.of(Function2) |
static <T1,T2,T3,R> |
Function(Function3<T1,T2,T3,R> methodReference)
Alias for
Function3.of(Function3) |
static <T1,T2,T3,T4,R> |
Function(Function4<T1,T2,T3,T4,R> methodReference)
Alias for
Function4.of(Function4) |
static <T1,T2,T3,T4,T5,R> |
Function(Function5<T1,T2,T3,T4,T5,R> methodReference)
Alias for
Function5.of(Function5) |
static <T1,T2,T3,T4,T5,T6,R> |
Function(Function6<T1,T2,T3,T4,T5,T6,R> methodReference)
Alias for
Function6.of(Function6) |
static <T1,T2,T3,T4,T5,T6,T7,R> |
Function(Function7<T1,T2,T3,T4,T5,T6,T7,R> methodReference)
Alias for
Function7.of(Function7) |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
Function(Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> methodReference)
Alias for
Function8.of(Function8) |
static <T> Future<T> |
Future(CheckedFunction0<? extends T> computation)
Alias for
Future.of(CheckedFunction0) |
static <T> Future<T> |
Future(java.util.concurrent.Executor executorService,
CheckedFunction0<? extends T> computation)
Alias for
Future.of(Executor, CheckedFunction0) |
static <T> Future<T> |
Future(java.util.concurrent.Executor executorService,
T result)
Alias for
Future.successful(Executor, Object) |
static <T> Future<T> |
Future(T result)
Alias for
Future.successful(Object) |
static <T> IndexedSeq<T> |
IndexedSeq()
Alias for
Vector.empty() |
static <T> IndexedSeq<T> |
IndexedSeq(T... elements)
Alias for
Vector.of(Object...) |
static <T> IndexedSeq<T> |
IndexedSeq(T element)
Alias for
Vector.of(Object) |
static <E,T> Validation<E,T> |
Invalid(E error)
Alias for
Validation.invalid(Object) |
static <T> Lazy<T> |
Lazy(java.util.function.Supplier<? extends T> supplier)
Alias for
Lazy.of(Supplier) |
static <L,R> Either<L,R> |
Left(L left)
Alias for
Either.left(Object) |
static <K,V> Map<K,V> |
LinkedMap()
Alias for
LinkedHashMap.empty() |
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1)
Alias for
LinkedHashMap.of(Object, Object) |
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8,
K k9,
V v9)
|
static <K,V> Map<K,V> |
LinkedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8,
K k9,
V v9,
K k10,
V v10)
|
static <K,V> Map<K,V> |
LinkedMap(Tuple2<? extends K,? extends V>... entries)
Deprecated.
Will be removed in a future version.
|
static <T> Set<T> |
LinkedSet()
Alias for
LinkedHashSet.empty() |
static <T> Set<T> |
LinkedSet(T... elements)
Alias for
LinkedHashSet.of(Object...) |
static <T> Set<T> |
LinkedSet(T element)
Alias for
LinkedHashSet.of(Object) |
static <T> List<T> |
List()
Alias for
List.empty() |
static <T> List<T> |
List(T... elements)
Alias for
List.of(Object...) |
static <T> List<T> |
List(T element)
Alias for
List.of(Object) |
static <K,V> Map<K,V> |
Map()
Alias for
HashMap.empty() |
static <K,V> Map<K,V> |
Map(K k1,
V v1)
Alias for
HashMap.of(Object, Object) |
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8,
K k9,
V v9)
|
static <K,V> Map<K,V> |
Map(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8,
K k9,
V v9,
K k10,
V v10)
|
static <K,V> Map<K,V> |
Map(Tuple2<? extends K,? extends V>... entries)
Deprecated.
Will be removed in a future version.
|
static <T> API.Match<T> |
Match(T value)
Entry point of the match API.
|
static <T> Option<T> |
None()
Alias for
Option.none() |
static <T> Option<T> |
Option(T value)
Alias for
Option.of(Object) |
static void |
print(java.lang.Object obj)
Shortcut for
System.out.print(obj) . |
static void |
printf(java.lang.String format,
java.lang.Object... args)
Shortcut for
System.out.printf(format, args) . |
static void |
println()
Shortcut for
System.out.println() . |
static void |
println(java.lang.Object... objs)
Prints the given objects as space ' ' separated string using
System.out.println() . |
static void |
println(java.lang.Object obj)
Shortcut for
System.out.println(obj) . |
static <T extends java.lang.Comparable<? super T>> |
PriorityQueue()
Alias for
PriorityQueue.empty() |
static <T extends java.lang.Comparable<? super T>> |
PriorityQueue(java.util.Comparator<? super T> comparator)
Alias for
PriorityQueue.empty(Comparator) |
static <T> PriorityQueue<T> |
PriorityQueue(java.util.Comparator<? super T> comparator,
T... elements)
Alias for
PriorityQueue.of(Comparator, Object...) |
static <T> PriorityQueue<T> |
PriorityQueue(java.util.Comparator<? super T> comparator,
T element)
Alias for
PriorityQueue.of(Comparator, Object) |
static <T extends java.lang.Comparable<? super T>> |
PriorityQueue(T... elements)
Alias for
PriorityQueue.of(Comparable...) |
static <T extends java.lang.Comparable<? super T>> |
PriorityQueue(T element)
Alias for
PriorityQueue.of(Comparable) |
static <T> Queue<T> |
Queue()
Alias for
Queue.empty() |
static <T> Queue<T> |
Queue(T... elements)
Alias for
Queue.of(Object...) |
static <T> Queue<T> |
Queue(T element)
Alias for
Queue.of(Object) |
static <L,R> Either<L,R> |
Right(R right)
Alias for
Either.right(Object) |
static java.lang.Void |
run(java.lang.Runnable unit)
Runs a
unit of work and returns Void . |
static <T> Seq<T> |
Seq()
Alias for
List.empty() |
static <T> Seq<T> |
Seq(T... elements)
Alias for
List.of(Object...) |
static <T> Seq<T> |
Seq(T element)
Alias for
List.of(Object) |
static <T> Set<T> |
Set()
Alias for
HashSet.empty() |
static <T> Set<T> |
Set(T... elements)
Alias for
HashSet.of(Object...) |
static <T> Set<T> |
Set(T element)
Alias for
HashSet.of(Object) |
static <T> Option<T> |
Some(T value)
Alias for
Option.some(Object) |
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap()
Alias for
TreeMap.empty() |
static <K,V> SortedMap<K,V> |
SortedMap(java.util.Comparator<? super K> keyComparator)
Alias for
TreeMap.empty(Comparator) |
static <K,V> SortedMap<K,V> |
SortedMap(java.util.Comparator<? super K> keyComparator,
K key,
V value)
Alias for
TreeMap.of(Comparator, Object, Object) |
static <K,V> SortedMap<K,V> |
SortedMap(java.util.Comparator<? super K> keyComparator,
Tuple2<? extends K,? extends V>... entries)
Deprecated.
Will be removed in a future version.
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1)
Alias for
TreeMap.of(Comparable, Object) |
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8,
K k9,
V v9)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7,
K k8,
V v8,
K k9,
V v9,
K k10,
V v10)
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(java.util.Map<? extends K,? extends V> map)
Deprecated.
Will be removed in a future version.
|
static <K extends java.lang.Comparable<? super K>,V> |
SortedMap(Tuple2<? extends K,? extends V>... entries)
Deprecated.
Will be removed in a future version.
|
static <T extends java.lang.Comparable<? super T>> |
SortedSet()
Alias for
TreeSet.empty() |
static <T extends java.lang.Comparable<? super T>> |
SortedSet(java.util.Comparator<? super T> comparator)
Alias for
TreeSet.empty(Comparator) |
static <T> SortedSet<T> |
SortedSet(java.util.Comparator<? super T> comparator,
T... elements)
Alias for
TreeSet.of(Comparator, Object...) |
static <T> SortedSet<T> |
SortedSet(java.util.Comparator<? super T> comparator,
T element)
Alias for
TreeSet.of(Comparator, Object) |
static <T extends java.lang.Comparable<? super T>> |
SortedSet(T... elements)
Alias for
TreeSet.of(Comparable...) |
static <T extends java.lang.Comparable<? super T>> |
SortedSet(T element)
Alias for
TreeSet.of(Comparable) |
static <T> Stream<T> |
Stream()
Alias for
Stream.empty() |
static <T> Stream<T> |
Stream(T... elements)
Alias for
Stream.of(Object...) |
static <T> Stream<T> |
Stream(T element)
Alias for
Stream.of(Object) |
static <T> Try<T> |
Success(T value)
Alias for
Try.success(Object) |
static <T> T |
TODO()
Deprecated.
marked for removal
|
static <T> T |
TODO(java.lang.String msg)
Deprecated.
marked for removal
|
static <T> Try<T> |
Try(CheckedFunction0<? extends T> supplier)
Alias for
Try.of(CheckedFunction0) |
static Tuple0 |
Tuple()
Alias for
Tuple.empty() |
static <T1> Tuple1<T1> |
Tuple(T1 t1)
Alias for
Tuple.of(Object)
Creates a tuple of one element. |
static <T1,T2> Tuple2<T1,T2> |
Tuple(T1 t1,
T2 t2)
Alias for
Tuple.of(Object, Object)
Creates a tuple of two elements. |
static <T1,T2,T3> Tuple3<T1,T2,T3> |
Tuple(T1 t1,
T2 t2,
T3 t3)
Alias for
Tuple.of(Object, Object, Object)
Creates a tuple of three elements. |
static <T1,T2,T3,T4> |
Tuple(T1 t1,
T2 t2,
T3 t3,
T4 t4)
Alias for
Tuple.of(Object, Object, Object, Object)
Creates a tuple of 4 elements. |
static <T1,T2,T3,T4,T5> |
Tuple(T1 t1,
T2 t2,
T3 t3,
T4 t4,
T5 t5)
Alias for
Tuple.of(Object, Object, Object, Object, Object)
Creates a tuple of 5 elements. |
static <T1,T2,T3,T4,T5,T6> |
Tuple(T1 t1,
T2 t2,
T3 t3,
T4 t4,
T5 t5,
T6 t6)
Alias for
Tuple.of(Object, Object, Object, Object, Object, Object)
Creates a tuple of 6 elements. |
static <T1,T2,T3,T4,T5,T6,T7> |
Tuple(T1 t1,
T2 t2,
T3 t3,
T4 t4,
T5 t5,
T6 t6,
T7 t7)
Alias for
Tuple.of(Object, Object, Object, Object, Object, Object, Object)
Creates a tuple of 7 elements. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Tuple(T1 t1,
T2 t2,
T3 t3,
T4 t4,
T5 t5,
T6 t6,
T7 t7,
T8 t8)
Alias for
Tuple.of(Object, Object, Object, Object, Object, Object, Object, Object)
Creates a tuple of 8 elements. |
static <R> Function0<R> |
unchecked(CheckedFunction0<R> f)
Alias for
CheckedFunction0.unchecked() |
static <T1,R> Function1<T1,R> |
unchecked(CheckedFunction1<T1,R> f)
Alias for
CheckedFunction1.unchecked() |
static <T1,T2,R> Function2<T1,T2,R> |
unchecked(CheckedFunction2<T1,T2,R> f)
Alias for
CheckedFunction2.unchecked() |
static <T1,T2,T3,R> |
unchecked(CheckedFunction3<T1,T2,T3,R> f)
Alias for
CheckedFunction3.unchecked() |
static <T1,T2,T3,T4,R> |
unchecked(CheckedFunction4<T1,T2,T3,T4,R> f)
Alias for
CheckedFunction4.unchecked() |
static <T1,T2,T3,T4,T5,R> |
unchecked(CheckedFunction5<T1,T2,T3,T4,T5,R> f)
Alias for
CheckedFunction5.unchecked() |
static <T1,T2,T3,T4,T5,T6,R> |
unchecked(CheckedFunction6<T1,T2,T3,T4,T5,T6,R> f)
Alias for
CheckedFunction6.unchecked() |
static <T1,T2,T3,T4,T5,T6,T7,R> |
unchecked(CheckedFunction7<T1,T2,T3,T4,T5,T6,T7,R> f)
Alias for
CheckedFunction7.unchecked() |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
unchecked(CheckedFunction8<T1,T2,T3,T4,T5,T6,T7,T8,R> f)
Alias for
CheckedFunction8.unchecked() |
static <E,T> Validation<E,T> |
Valid(T value)
Alias for
Validation.valid(Object) |
static <T> Vector<T> |
Vector()
Alias for
Vector.empty() |
static <T> Vector<T> |
Vector(T... elements)
Alias for
Vector.of(Object...) |
static <T> Vector<T> |
Vector(T element)
Alias for
Vector.of(Object) |
@Deprecated public static <T> T TODO()
Example:
public HttpResponse getResponse(HttpRequest request) {
return TODO();
}
final HttpResponse response = getHttpResponse(TODO());
T
- The result type of the missing implementation.NotImplementedError
- when this methods is calledNotImplementedError()
@Deprecated public static <T> T TODO(java.lang.String msg)
Example:
public HttpResponse getResponse(HttpRequest request) {
return TODO("fake response");
}
final HttpResponse response = getHttpResponse(TODO("fake request"));
T
- The result type of the missing implementation.msg
- An error messageNotImplementedError
- when this methods is calledNotImplementedError(String)
public static void print(java.lang.Object obj)
System.out.print(obj)
. See PrintStream.print(Object)
.obj
- The Object
to be printedpublic static void printf(java.lang.String format, java.lang.Object... args)
System.out.printf(format, args)
. See PrintStream.printf(String, Object...)
.format
- A format string as described in Formatter
.args
- Arguments referenced by the format specifierspublic static void println(java.lang.Object obj)
System.out.println(obj)
. See PrintStream.println(Object)
.obj
- The Object
to be printedpublic static void println()
System.out.println()
. See PrintStream.println()
.public static void println(java.lang.Object... objs)
System.out.println()
.objs
- The objects to be printedpublic static <R> Function0<R> Function(Function0<R> methodReference)
Function0.of(Function0)
R
- return typemethodReference
- A method referenceFunction0
public static <T1,R> Function1<T1,R> Function(Function1<T1,R> methodReference)
Function1.of(Function1)
R
- return typeT1
- type of the 1st argumentmethodReference
- A method referenceFunction1
public static <T1,T2,R> Function2<T1,T2,R> Function(Function2<T1,T2,R> methodReference)
Function2.of(Function2)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentmethodReference
- A method referenceFunction2
public static <T1,T2,T3,R> Function3<T1,T2,T3,R> Function(Function3<T1,T2,T3,R> methodReference)
Function3.of(Function3)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentmethodReference
- A method referenceFunction3
public static <T1,T2,T3,T4,R> Function4<T1,T2,T3,T4,R> Function(Function4<T1,T2,T3,T4,R> methodReference)
Function4.of(Function4)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentmethodReference
- A method referenceFunction4
public static <T1,T2,T3,T4,T5,R> Function5<T1,T2,T3,T4,T5,R> Function(Function5<T1,T2,T3,T4,T5,R> methodReference)
Function5.of(Function5)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentmethodReference
- A method referenceFunction5
public static <T1,T2,T3,T4,T5,T6,R> Function6<T1,T2,T3,T4,T5,T6,R> Function(Function6<T1,T2,T3,T4,T5,T6,R> methodReference)
Function6.of(Function6)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentmethodReference
- A method referenceFunction6
public static <T1,T2,T3,T4,T5,T6,T7,R> Function7<T1,T2,T3,T4,T5,T6,T7,R> Function(Function7<T1,T2,T3,T4,T5,T6,T7,R> methodReference)
Function7.of(Function7)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentT7
- type of the 7th argumentmethodReference
- A method referenceFunction7
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> Function(Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> methodReference)
Function8.of(Function8)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentT7
- type of the 7th argumentT8
- type of the 8th argumentmethodReference
- A method referenceFunction8
public static <R> CheckedFunction0<R> CheckedFunction(CheckedFunction0<R> methodReference)
CheckedFunction0.of(CheckedFunction0)
R
- return typemethodReference
- A method referenceCheckedFunction0
public static <T1,R> CheckedFunction1<T1,R> CheckedFunction(CheckedFunction1<T1,R> methodReference)
CheckedFunction1.of(CheckedFunction1)
R
- return typeT1
- type of the 1st argumentmethodReference
- A method referenceCheckedFunction1
public static <T1,T2,R> CheckedFunction2<T1,T2,R> CheckedFunction(CheckedFunction2<T1,T2,R> methodReference)
CheckedFunction2.of(CheckedFunction2)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentmethodReference
- A method referenceCheckedFunction2
public static <T1,T2,T3,R> CheckedFunction3<T1,T2,T3,R> CheckedFunction(CheckedFunction3<T1,T2,T3,R> methodReference)
CheckedFunction3.of(CheckedFunction3)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentmethodReference
- A method referenceCheckedFunction3
public static <T1,T2,T3,T4,R> CheckedFunction4<T1,T2,T3,T4,R> CheckedFunction(CheckedFunction4<T1,T2,T3,T4,R> methodReference)
CheckedFunction4.of(CheckedFunction4)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentmethodReference
- A method referenceCheckedFunction4
public static <T1,T2,T3,T4,T5,R> CheckedFunction5<T1,T2,T3,T4,T5,R> CheckedFunction(CheckedFunction5<T1,T2,T3,T4,T5,R> methodReference)
CheckedFunction5.of(CheckedFunction5)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentmethodReference
- A method referenceCheckedFunction5
public static <T1,T2,T3,T4,T5,T6,R> CheckedFunction6<T1,T2,T3,T4,T5,T6,R> CheckedFunction(CheckedFunction6<T1,T2,T3,T4,T5,T6,R> methodReference)
CheckedFunction6.of(CheckedFunction6)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentmethodReference
- A method referenceCheckedFunction6
public static <T1,T2,T3,T4,T5,T6,T7,R> CheckedFunction7<T1,T2,T3,T4,T5,T6,T7,R> CheckedFunction(CheckedFunction7<T1,T2,T3,T4,T5,T6,T7,R> methodReference)
CheckedFunction7.of(CheckedFunction7)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentT7
- type of the 7th argumentmethodReference
- A method referenceCheckedFunction7
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> CheckedFunction8<T1,T2,T3,T4,T5,T6,T7,T8,R> CheckedFunction(CheckedFunction8<T1,T2,T3,T4,T5,T6,T7,T8,R> methodReference)
CheckedFunction8.of(CheckedFunction8)
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentT7
- type of the 7th argumentT8
- type of the 8th argumentmethodReference
- A method referenceCheckedFunction8
public static <R> Function0<R> unchecked(CheckedFunction0<R> f)
CheckedFunction0.unchecked()
R
- return typef
- A method referenceCheckedFunction0
public static <T1,R> Function1<T1,R> unchecked(CheckedFunction1<T1,R> f)
CheckedFunction1.unchecked()
R
- return typeT1
- type of the 1st argumentf
- A method referenceCheckedFunction1
public static <T1,T2,R> Function2<T1,T2,R> unchecked(CheckedFunction2<T1,T2,R> f)
CheckedFunction2.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentf
- A method referenceCheckedFunction2
public static <T1,T2,T3,R> Function3<T1,T2,T3,R> unchecked(CheckedFunction3<T1,T2,T3,R> f)
CheckedFunction3.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentf
- A method referenceCheckedFunction3
public static <T1,T2,T3,T4,R> Function4<T1,T2,T3,T4,R> unchecked(CheckedFunction4<T1,T2,T3,T4,R> f)
CheckedFunction4.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentf
- A method referenceCheckedFunction4
public static <T1,T2,T3,T4,T5,R> Function5<T1,T2,T3,T4,T5,R> unchecked(CheckedFunction5<T1,T2,T3,T4,T5,R> f)
CheckedFunction5.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentf
- A method referenceCheckedFunction5
public static <T1,T2,T3,T4,T5,T6,R> Function6<T1,T2,T3,T4,T5,T6,R> unchecked(CheckedFunction6<T1,T2,T3,T4,T5,T6,R> f)
CheckedFunction6.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentf
- A method referenceCheckedFunction6
public static <T1,T2,T3,T4,T5,T6,T7,R> Function7<T1,T2,T3,T4,T5,T6,T7,R> unchecked(CheckedFunction7<T1,T2,T3,T4,T5,T6,T7,R> f)
CheckedFunction7.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentT7
- type of the 7th argumentf
- A method referenceCheckedFunction7
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> unchecked(CheckedFunction8<T1,T2,T3,T4,T5,T6,T7,T8,R> f)
CheckedFunction8.unchecked()
R
- return typeT1
- type of the 1st argumentT2
- type of the 2nd argumentT3
- type of the 3rd argumentT4
- type of the 4th argumentT5
- type of the 5th argumentT6
- type of the 6th argumentT7
- type of the 7th argumentT8
- type of the 8th argumentf
- A method referenceCheckedFunction8
public static Tuple0 Tuple()
Tuple.empty()
public static <T1> Tuple1<T1> Tuple(T1 t1)
Tuple.of(Object)
Creates a tuple of one element.T1
- type of the 1st elementt1
- the 1st elementpublic static <T1,T2> Tuple2<T1,T2> Tuple(T1 t1, T2 t2)
Tuple.of(Object, Object)
Creates a tuple of two elements.T1
- type of the 1st elementT2
- type of the 2nd elementt1
- the 1st elementt2
- the 2nd elementpublic static <T1,T2,T3> Tuple3<T1,T2,T3> Tuple(T1 t1, T2 t2, T3 t3)
Tuple.of(Object, Object, Object)
Creates a tuple of three elements.T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementpublic static <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> Tuple(T1 t1, T2 t2, T3 t3, T4 t4)
Tuple.of(Object, Object, Object, Object)
Creates a tuple of 4 elements.T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementpublic static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> Tuple(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
Tuple.of(Object, Object, Object, Object, Object)
Creates a tuple of 5 elements.T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementpublic static <T1,T2,T3,T4,T5,T6> Tuple6<T1,T2,T3,T4,T5,T6> Tuple(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
Tuple.of(Object, Object, Object, Object, Object, Object)
Creates a tuple of 6 elements.T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementT6
- type of the 6th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementt6
- the 6th elementpublic static <T1,T2,T3,T4,T5,T6,T7> Tuple7<T1,T2,T3,T4,T5,T6,T7> Tuple(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
Tuple.of(Object, Object, Object, Object, Object, Object, Object)
Creates a tuple of 7 elements.T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementT6
- type of the 6th elementT7
- type of the 7th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementt6
- the 6th elementt7
- the 7th elementpublic static <T1,T2,T3,T4,T5,T6,T7,T8> Tuple8<T1,T2,T3,T4,T5,T6,T7,T8> Tuple(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
Tuple.of(Object, Object, Object, Object, Object, Object, Object, Object)
Creates a tuple of 8 elements.T1
- type of the 1st elementT2
- type of the 2nd elementT3
- type of the 3rd elementT4
- type of the 4th elementT5
- type of the 5th elementT6
- type of the 6th elementT7
- type of the 7th elementT8
- type of the 8th elementt1
- the 1st elementt2
- the 2nd elementt3
- the 3rd elementt4
- the 4th elementt5
- the 5th elementt6
- the 6th elementt7
- the 7th elementt8
- the 8th elementpublic static <L,R> Either<L,R> Right(R right)
Either.right(Object)
L
- Type of left value.R
- Type of right value.right
- The value.Either
instance.public static <L,R> Either<L,R> Left(L left)
Either.left(Object)
L
- Type of left value.R
- Type of right value.left
- The value.Either
instance.public static <T> Future<T> Future(CheckedFunction0<? extends T> computation)
Future.of(CheckedFunction0)
T
- Type of the computation result.computation
- A computation.Future
instance.java.lang.NullPointerException
- if computation is null.public static <T> Future<T> Future(java.util.concurrent.Executor executorService, CheckedFunction0<? extends T> computation)
Future.of(Executor, CheckedFunction0)
T
- Type of the computation result.executorService
- An executor service.computation
- A computation.Future
instance.java.lang.NullPointerException
- if one of executorService or computation is null.public static <T> Future<T> Future(T result)
Future.successful(Object)
T
- The value type of a successful result.result
- The result.Future
.public static <T> Future<T> Future(java.util.concurrent.Executor executorService, T result)
Future.successful(Executor, Object)
T
- The value type of a successful result.executorService
- An ExecutorService
.result
- The result.Future
.java.lang.NullPointerException
- if executorService is nullpublic static <T> Lazy<T> Lazy(java.util.function.Supplier<? extends T> supplier)
Lazy.of(Supplier)
T
- type of the lazy valuesupplier
- A supplierLazy
public static <T> Option<T> Option(T value)
Option.of(Object)
T
- type of the valuevalue
- A valueOption.Some
if value is not null
, Option.None
otherwisepublic static <T> Option<T> Some(T value)
Option.some(Object)
T
- type of the valuevalue
- A valueOption
public static <T> Option<T> None()
Option.none()
T
- component typeOption
public static <T> Try<T> Try(CheckedFunction0<? extends T> supplier)
Try.of(CheckedFunction0)
T
- Component typesupplier
- A checked supplierTry.Success
if no exception occurs, otherwise Try.Failure
if an
exception occurs calling supplier.get()
.public static <T> Try<T> Success(T value)
Try.success(Object)
T
- Type of the given value
.value
- A value.Try
.public static <T> Try<T> Failure(java.lang.Throwable exception)
Try.failure(Throwable)
T
- Component type of the Try
.exception
- An exception.Try
.public static <E,T> Validation<E,T> Valid(T value)
Validation.valid(Object)
E
- type of the errorT
- type of the given value
value
- A valueValidation
java.lang.NullPointerException
- if value is nullpublic static <E,T> Validation<E,T> Invalid(E error)
Validation.invalid(Object)
E
- type of the given error
T
- type of the valueerror
- An errorValidation
java.lang.NullPointerException
- if error is nullpublic static CharSeq CharSeq(char character)
CharSeq.of(char)
character
- A character.CharSeq
instance containing the given elementpublic static CharSeq CharSeq(char... characters)
CharSeq.of(char...)
characters
- Zero or more characters.CharSeq
instance containing the given characters in the same order.java.lang.NullPointerException
- if elements
is nullpublic static CharSeq CharSeq(java.lang.CharSequence sequence)
CharSeq.of(CharSequence)
sequence
- CharSequence
instance.CharSeq
instancepublic static <T extends java.lang.Comparable<? super T>> PriorityQueue<T> PriorityQueue()
PriorityQueue.empty()
T
- Component type of element.PriorityQueue
empty instancepublic static <T extends java.lang.Comparable<? super T>> PriorityQueue<T> PriorityQueue(java.util.Comparator<? super T> comparator)
PriorityQueue.empty(Comparator)
T
- Component type of element.comparator
- The comparator used to sort the elementsPriorityQueue
empty instancepublic static <T extends java.lang.Comparable<? super T>> PriorityQueue<T> PriorityQueue(T element)
PriorityQueue.of(Comparable)
T
- Component type of element.element
- An element.PriorityQueue
instance containing the given elementpublic static <T> PriorityQueue<T> PriorityQueue(java.util.Comparator<? super T> comparator, T element)
PriorityQueue.of(Comparator, Object)
T
- Component type of element.comparator
- The comparator used to sort the elementselement
- An element.PriorityQueue
instance containing the given element@SafeVarargs public static <T extends java.lang.Comparable<? super T>> PriorityQueue<T> PriorityQueue(T... elements)
PriorityQueue.of(Comparable...)
T
- Component type of element.elements
- Zero or more elements.PriorityQueue
instance containing the given elements@SafeVarargs public static <T> PriorityQueue<T> PriorityQueue(java.util.Comparator<? super T> comparator, T... elements)
PriorityQueue.of(Comparator, Object...)
T
- Component type of element.comparator
- The comparator used to sort the elementselements
- Zero or more elements.PriorityQueue
instance containing the given elementspublic static <T> Seq<T> Seq()
List.empty()
T
- Component type of element.List
public static <T> Seq<T> Seq(T element)
List.of(Object)
T
- Component type of element.element
- An element.List
instance containing the given element@SafeVarargs public static <T> Seq<T> Seq(T... elements)
List.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.List
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> IndexedSeq<T> IndexedSeq()
Vector.empty()
T
- Component type of element.Vector
public static <T> IndexedSeq<T> IndexedSeq(T element)
Vector.of(Object)
T
- Component type of element.element
- An element.Vector
instance containing the given element@SafeVarargs public static <T> IndexedSeq<T> IndexedSeq(T... elements)
Vector.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.Vector
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> Array<T> Array()
Array.empty()
T
- Component type of element.Array
public static <T> Array<T> Array(T element)
Array.of(Object)
T
- Component type of element.element
- An element.Array
instance containing the given element@SafeVarargs public static <T> Array<T> Array(T... elements)
Array.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.Array
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> List<T> List()
List.empty()
T
- Component type of element.List
public static <T> List<T> List(T element)
List.of(Object)
T
- Component type of element.element
- An element.List
instance containing the given element@SafeVarargs public static <T> List<T> List(T... elements)
List.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.List
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> Queue<T> Queue()
Queue.empty()
T
- Component type of element.Queue
public static <T> Queue<T> Queue(T element)
Queue.of(Object)
T
- Component type of element.element
- An element.Queue
instance containing the given element@SafeVarargs public static <T> Queue<T> Queue(T... elements)
Queue.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.Queue
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> Stream<T> Stream()
Stream.empty()
T
- Component type of element.Stream
public static <T> Stream<T> Stream(T element)
Stream.of(Object)
T
- Component type of element.element
- An element.Stream
instance containing the given element@SafeVarargs public static <T> Stream<T> Stream(T... elements)
Stream.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.Stream
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> Vector<T> Vector()
Vector.empty()
T
- Component type of element.Vector
public static <T> Vector<T> Vector(T element)
Vector.of(Object)
T
- Component type of element.element
- An element.Vector
instance containing the given element@SafeVarargs public static <T> Vector<T> Vector(T... elements)
Vector.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.Vector
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> Set<T> Set()
HashSet.empty()
T
- Component type of element.HashSet
public static <T> Set<T> Set(T element)
HashSet.of(Object)
T
- Component type of element.element
- An element.HashSet
instance containing the given element@SafeVarargs public static <T> Set<T> Set(T... elements)
HashSet.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.HashSet
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T> Set<T> LinkedSet()
LinkedHashSet.empty()
T
- Component type of element.LinkedHashSet
public static <T> Set<T> LinkedSet(T element)
LinkedHashSet.of(Object)
T
- Component type of element.element
- An element.LinkedHashSet
instance containing the given element@SafeVarargs public static <T> Set<T> LinkedSet(T... elements)
LinkedHashSet.of(Object...)
T
- Component type of elements.elements
- Zero or more elements.LinkedHashSet
instance containing the given elementsjava.lang.NullPointerException
- if elements
is nullpublic static <T extends java.lang.Comparable<? super T>> SortedSet<T> SortedSet()
TreeSet.empty()
T
- Component type of element.TreeSet
empty instancepublic static <T extends java.lang.Comparable<? super T>> SortedSet<T> SortedSet(java.util.Comparator<? super T> comparator)
TreeSet.empty(Comparator)
T
- Component type of element.comparator
- The comparator used to sort the elementsTreeSet
empty instancepublic static <T extends java.lang.Comparable<? super T>> SortedSet<T> SortedSet(T element)
TreeSet.of(Comparable)
T
- Component type of element.element
- An element.TreeSet
instance containing the given elementpublic static <T> SortedSet<T> SortedSet(java.util.Comparator<? super T> comparator, T element)
TreeSet.of(Comparator, Object)
T
- Component type of element.comparator
- The comparator used to sort the elementselement
- An element.TreeSet
instance containing the given element@SafeVarargs public static <T extends java.lang.Comparable<? super T>> SortedSet<T> SortedSet(T... elements)
TreeSet.of(Comparable...)
T
- Component type of element.elements
- Zero or more elements.TreeSet
instance containing the given elements@SafeVarargs public static <T> SortedSet<T> SortedSet(java.util.Comparator<? super T> comparator, T... elements)
TreeSet.of(Comparator, Object...)
T
- Component type of element.comparator
- The comparator used to sort the elementselements
- Zero or more elements.TreeSet
instance containing the given elementspublic static <K,V> Map<K,V> Map()
HashMap.empty()
K
- The key type.V
- The value type.HashMap
@Deprecated @SafeVarargs public static <K,V> Map<K,V> Map(Tuple2<? extends K,? extends V>... entries)
HashMap.ofEntries(Tuple2...)
K
- The key type.V
- The value type.entries
- Map entries.HashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1)
HashMap.of(Object, Object)
K
- The key type.V
- The value type.k1
- The keyv1
- The valueHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
HashMap.of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairk9
- The key of the 9th pairv9
- The value of the 9th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> Map(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairk9
- The key of the 9th pairv9
- The value of the 9th pairk10
- The key of the 10th pairv10
- The value of the 10th pairHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap()
LinkedHashMap.empty()
K
- The key type.V
- The value type.LinkedHashMap
@Deprecated @SafeVarargs public static <K,V> Map<K,V> LinkedMap(Tuple2<? extends K,? extends V>... entries)
LinkedHashMap.ofEntries(Tuple2...)
K
- The key type.V
- The value type.entries
- Map entries.LinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1)
LinkedHashMap.of(Object, Object)
K
- The key type.V
- The value type.k1
- The keyv1
- The valueLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
LinkedHashMap.of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairk9
- The key of the 9th pairv9
- The value of the 9th pairLinkedHashMap
instance containing the given entriespublic static <K,V> Map<K,V> LinkedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairk9
- The key of the 9th pairv9
- The value of the 9th pairk10
- The key of the 10th pairv10
- The value of the 10th pairLinkedHashMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap()
TreeMap.empty()
K
- The key type.V
- The value type.TreeMap
instancepublic static <K,V> SortedMap<K,V> SortedMap(java.util.Comparator<? super K> keyComparator)
TreeMap.empty(Comparator)
K
- The key type.V
- The value type.keyComparator
- The comparator used to sort the entries by their keyTreeMap
instancepublic static <K,V> SortedMap<K,V> SortedMap(java.util.Comparator<? super K> keyComparator, K key, V value)
TreeMap.of(Comparator, Object, Object)
K
- The key type.V
- The value type.keyComparator
- The comparator used to sort the entries by their keykey
- A singleton map key.value
- A singleton map value.TreeMap
instance containing the given entry@Deprecated @SafeVarargs public static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(Tuple2<? extends K,? extends V>... entries)
TreeMap.ofEntries(Tuple2...)
K
- The key type.V
- The value type.entries
- Map entries.TreeMap
instance containing the given entries@Deprecated @SafeVarargs public static <K,V> SortedMap<K,V> SortedMap(java.util.Comparator<? super K> keyComparator, Tuple2<? extends K,? extends V>... entries)
TreeMap.ofEntries(Comparator, Tuple2...)
K
- The key type.V
- The value type.keyComparator
- The comparator used to sort the entries by their keyentries
- Map entries.TreeMap
instance containing the given entry@Deprecated public static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(java.util.Map<? extends K,? extends V> map)
TreeMap.ofAll(java.util.Map)
K
- The key type.V
- The value type.map
- A map entry.TreeMap
instance containing the given mappublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1)
TreeMap.of(Comparable, Object)
K
- The key type.V
- The value type.k1
- The keyv1
- The valueTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
TreeMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairk9
- The key of the 9th pairv9
- The value of the 9th pairTreeMap
instance containing the given entriespublic static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> SortedMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10)
K
- The key type.V
- The value type.k1
- The key of the 1st pairv1
- The value of the 1st pairk2
- The key of the 2nd pairv2
- The value of the 2nd pairk3
- The key of the 3rd pairv3
- The value of the 3rd pairk4
- The key of the 4th pairv4
- The value of the 4th pairk5
- The key of the 5th pairv5
- The value of the 5th pairk6
- The key of the 6th pairv6
- The value of the 6th pairk7
- The key of the 7th pairv7
- The value of the 7th pairk8
- The key of the 8th pairv8
- The value of the 8th pairk9
- The key of the 9th pairv9
- The value of the 9th pairk10
- The key of the 10th pairv10
- The value of the 10th pairTreeMap
instance containing the given entriespublic static java.lang.Void run(java.lang.Runnable unit)
unit
of work and returns Void
. This is helpful when a return value is expected,
e.g. by Match
:
Match(i).of(
Case($(is(0)), i -> run(() -> System.out.println("zero"))),
Case($(is(1)), i -> run(() -> System.out.println("one"))),
Case($(), o -> run(() -> System.out.println("many")))
)
unit
- A block of code to be run.Void
, namely null
@Deprecated public static <T,U> Iterator<U> For(java.lang.Iterable<T> ts, java.util.function.Function<? super T,? extends java.lang.Iterable<U>> f)
Iterator.ofAll(ts).flatMap(f)
which allows us to write real for-comprehensions using
For(...).yield(...)
.
Example:
For(getPersons(), person ->
For(person.getTweets(), tweet ->
For(tweet.getReplies())
.yield(reply -> person + ", " + tweet + ", " + reply)));
T
- element type of ts
U
- component type of the resulting Iterator
ts
- A Iterable
f
- A function T -> Iterable<U>
@Deprecated public static <T1> API.For1<T1> For(java.lang.Iterable<T1> ts1)
For
-comprehension of one Iterable.T1
- right component type of the 1st Iterablets1
- the 1st IterableFor
-comprehension of arity 1@Deprecated public static <T1,T2> API.For2<T1,T2> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2)
For
-comprehension of two Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd Iterablets1
- the 1st Iterablets2
- the 2nd IterableFor
-comprehension of arity 2@Deprecated public static <T1,T2,T3> API.For3<T1,T2,T3> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2, java.lang.Iterable<T3> ts3)
For
-comprehension of three Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd IterableT3
- right component type of the 3rd Iterablets1
- the 1st Iterablets2
- the 2nd Iterablets3
- the 3rd IterableFor
-comprehension of arity 3@Deprecated public static <T1,T2,T3,T4> API.For4<T1,T2,T3,T4> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2, java.lang.Iterable<T3> ts3, java.lang.Iterable<T4> ts4)
For
-comprehension of 4 Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd IterableT3
- right component type of the 3rd IterableT4
- right component type of the 4th Iterablets1
- the 1st Iterablets2
- the 2nd Iterablets3
- the 3rd Iterablets4
- the 4th IterableFor
-comprehension of arity 4@Deprecated public static <T1,T2,T3,T4,T5> API.For5<T1,T2,T3,T4,T5> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2, java.lang.Iterable<T3> ts3, java.lang.Iterable<T4> ts4, java.lang.Iterable<T5> ts5)
For
-comprehension of 5 Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd IterableT3
- right component type of the 3rd IterableT4
- right component type of the 4th IterableT5
- right component type of the 5th Iterablets1
- the 1st Iterablets2
- the 2nd Iterablets3
- the 3rd Iterablets4
- the 4th Iterablets5
- the 5th IterableFor
-comprehension of arity 5@Deprecated public static <T1,T2,T3,T4,T5,T6> API.For6<T1,T2,T3,T4,T5,T6> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2, java.lang.Iterable<T3> ts3, java.lang.Iterable<T4> ts4, java.lang.Iterable<T5> ts5, java.lang.Iterable<T6> ts6)
For
-comprehension of 6 Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd IterableT3
- right component type of the 3rd IterableT4
- right component type of the 4th IterableT5
- right component type of the 5th IterableT6
- right component type of the 6th Iterablets1
- the 1st Iterablets2
- the 2nd Iterablets3
- the 3rd Iterablets4
- the 4th Iterablets5
- the 5th Iterablets6
- the 6th IterableFor
-comprehension of arity 6@Deprecated public static <T1,T2,T3,T4,T5,T6,T7> API.For7<T1,T2,T3,T4,T5,T6,T7> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2, java.lang.Iterable<T3> ts3, java.lang.Iterable<T4> ts4, java.lang.Iterable<T5> ts5, java.lang.Iterable<T6> ts6, java.lang.Iterable<T7> ts7)
For
-comprehension of 7 Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd IterableT3
- right component type of the 3rd IterableT4
- right component type of the 4th IterableT5
- right component type of the 5th IterableT6
- right component type of the 6th IterableT7
- right component type of the 7th Iterablets1
- the 1st Iterablets2
- the 2nd Iterablets3
- the 3rd Iterablets4
- the 4th Iterablets5
- the 5th Iterablets6
- the 6th Iterablets7
- the 7th IterableFor
-comprehension of arity 7@Deprecated public static <T1,T2,T3,T4,T5,T6,T7,T8> API.For8<T1,T2,T3,T4,T5,T6,T7,T8> For(java.lang.Iterable<T1> ts1, java.lang.Iterable<T2> ts2, java.lang.Iterable<T3> ts3, java.lang.Iterable<T4> ts4, java.lang.Iterable<T5> ts5, java.lang.Iterable<T6> ts6, java.lang.Iterable<T7> ts7, java.lang.Iterable<T8> ts8)
For
-comprehension of 8 Iterables.T1
- right component type of the 1st IterableT2
- right component type of the 2nd IterableT3
- right component type of the 3rd IterableT4
- right component type of the 4th IterableT5
- right component type of the 5th IterableT6
- right component type of the 6th IterableT7
- right component type of the 7th IterableT8
- right component type of the 8th Iterablets1
- the 1st Iterablets2
- the 2nd Iterablets3
- the 3rd Iterablets4
- the 4th Iterablets5
- the 5th Iterablets6
- the 6th Iterablets7
- the 7th Iterablets8
- the 8th IterableFor
-comprehension of arity 8@Deprecated public static <T1> API.For1Option<T1> For(Option<T1> ts1)
For
-comprehension of one Option.T1
- right component type of the 1st Optionts1
- the 1st OptionFor
-comprehension of arity 1@Deprecated public static <T1,T2> API.For2Option<T1,T2> For(Option<T1> ts1, Option<T2> ts2)
For
-comprehension of two Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd Optionts1
- the 1st Optionts2
- the 2nd OptionFor
-comprehension of arity 2@Deprecated public static <T1,T2,T3> API.For3Option<T1,T2,T3> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3)
For
-comprehension of three Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd OptionT3
- right component type of the 3rd Optionts1
- the 1st Optionts2
- the 2nd Optionts3
- the 3rd OptionFor
-comprehension of arity 3@Deprecated public static <T1,T2,T3,T4> API.For4Option<T1,T2,T3,T4> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4)
For
-comprehension of 4 Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd OptionT3
- right component type of the 3rd OptionT4
- right component type of the 4th Optionts1
- the 1st Optionts2
- the 2nd Optionts3
- the 3rd Optionts4
- the 4th OptionFor
-comprehension of arity 4@Deprecated public static <T1,T2,T3,T4,T5> API.For5Option<T1,T2,T3,T4,T5> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5)
For
-comprehension of 5 Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd OptionT3
- right component type of the 3rd OptionT4
- right component type of the 4th OptionT5
- right component type of the 5th Optionts1
- the 1st Optionts2
- the 2nd Optionts3
- the 3rd Optionts4
- the 4th Optionts5
- the 5th OptionFor
-comprehension of arity 5@Deprecated public static <T1,T2,T3,T4,T5,T6> API.For6Option<T1,T2,T3,T4,T5,T6> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5, Option<T6> ts6)
For
-comprehension of 6 Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd OptionT3
- right component type of the 3rd OptionT4
- right component type of the 4th OptionT5
- right component type of the 5th OptionT6
- right component type of the 6th Optionts1
- the 1st Optionts2
- the 2nd Optionts3
- the 3rd Optionts4
- the 4th Optionts5
- the 5th Optionts6
- the 6th OptionFor
-comprehension of arity 6@Deprecated public static <T1,T2,T3,T4,T5,T6,T7> API.For7Option<T1,T2,T3,T4,T5,T6,T7> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5, Option<T6> ts6, Option<T7> ts7)
For
-comprehension of 7 Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd OptionT3
- right component type of the 3rd OptionT4
- right component type of the 4th OptionT5
- right component type of the 5th OptionT6
- right component type of the 6th OptionT7
- right component type of the 7th Optionts1
- the 1st Optionts2
- the 2nd Optionts3
- the 3rd Optionts4
- the 4th Optionts5
- the 5th Optionts6
- the 6th Optionts7
- the 7th OptionFor
-comprehension of arity 7@Deprecated public static <T1,T2,T3,T4,T5,T6,T7,T8> API.For8Option<T1,T2,T3,T4,T5,T6,T7,T8> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5, Option<T6> ts6, Option<T7> ts7, Option<T8> ts8)
For
-comprehension of 8 Options.T1
- right component type of the 1st OptionT2
- right component type of the 2nd OptionT3
- right component type of the 3rd OptionT4
- right component type of the 4th OptionT5
- right component type of the 5th OptionT6
- right component type of the 6th OptionT7
- right component type of the 7th OptionT8
- right component type of the 8th Optionts1
- the 1st Optionts2
- the 2nd Optionts3
- the 3rd Optionts4
- the 4th Optionts5
- the 5th Optionts6
- the 6th Optionts7
- the 7th Optionts8
- the 8th OptionFor
-comprehension of arity 8@Deprecated public static <T1> API.For1Future<T1> For(Future<T1> ts1)
For
-comprehension of one Future.T1
- right component type of the 1st Futurets1
- the 1st FutureFor
-comprehension of arity 1@Deprecated public static <T1,T2> API.For2Future<T1,T2> For(Future<T1> ts1, Future<T2> ts2)
For
-comprehension of two Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd Futurets1
- the 1st Futurets2
- the 2nd FutureFor
-comprehension of arity 2@Deprecated public static <T1,T2,T3> API.For3Future<T1,T2,T3> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3)
For
-comprehension of three Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd FutureT3
- right component type of the 3rd Futurets1
- the 1st Futurets2
- the 2nd Futurets3
- the 3rd FutureFor
-comprehension of arity 3@Deprecated public static <T1,T2,T3,T4> API.For4Future<T1,T2,T3,T4> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4)
For
-comprehension of 4 Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd FutureT3
- right component type of the 3rd FutureT4
- right component type of the 4th Futurets1
- the 1st Futurets2
- the 2nd Futurets3
- the 3rd Futurets4
- the 4th FutureFor
-comprehension of arity 4@Deprecated public static <T1,T2,T3,T4,T5> API.For5Future<T1,T2,T3,T4,T5> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5)
For
-comprehension of 5 Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd FutureT3
- right component type of the 3rd FutureT4
- right component type of the 4th FutureT5
- right component type of the 5th Futurets1
- the 1st Futurets2
- the 2nd Futurets3
- the 3rd Futurets4
- the 4th Futurets5
- the 5th FutureFor
-comprehension of arity 5@Deprecated public static <T1,T2,T3,T4,T5,T6> API.For6Future<T1,T2,T3,T4,T5,T6> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6)
For
-comprehension of 6 Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd FutureT3
- right component type of the 3rd FutureT4
- right component type of the 4th FutureT5
- right component type of the 5th FutureT6
- right component type of the 6th Futurets1
- the 1st Futurets2
- the 2nd Futurets3
- the 3rd Futurets4
- the 4th Futurets5
- the 5th Futurets6
- the 6th FutureFor
-comprehension of arity 6@Deprecated public static <T1,T2,T3,T4,T5,T6,T7> API.For7Future<T1,T2,T3,T4,T5,T6,T7> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7)
For
-comprehension of 7 Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd FutureT3
- right component type of the 3rd FutureT4
- right component type of the 4th FutureT5
- right component type of the 5th FutureT6
- right component type of the 6th FutureT7
- right component type of the 7th Futurets1
- the 1st Futurets2
- the 2nd Futurets3
- the 3rd Futurets4
- the 4th Futurets5
- the 5th Futurets6
- the 6th Futurets7
- the 7th FutureFor
-comprehension of arity 7@Deprecated public static <T1,T2,T3,T4,T5,T6,T7,T8> API.For8Future<T1,T2,T3,T4,T5,T6,T7,T8> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7, Future<T8> ts8)
For
-comprehension of 8 Futures.T1
- right component type of the 1st FutureT2
- right component type of the 2nd FutureT3
- right component type of the 3rd FutureT4
- right component type of the 4th FutureT5
- right component type of the 5th FutureT6
- right component type of the 6th FutureT7
- right component type of the 7th FutureT8
- right component type of the 8th Futurets1
- the 1st Futurets2
- the 2nd Futurets3
- the 3rd Futurets4
- the 4th Futurets5
- the 5th Futurets6
- the 6th Futurets7
- the 7th Futurets8
- the 8th FutureFor
-comprehension of arity 8@Deprecated public static <T1> API.For1Try<T1> For(Try<T1> ts1)
For
-comprehension of one Try.T1
- right component type of the 1st Tryts1
- the 1st TryFor
-comprehension of arity 1@Deprecated public static <T1,T2> API.For2Try<T1,T2> For(Try<T1> ts1, Try<T2> ts2)
For
-comprehension of two Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd Tryts1
- the 1st Tryts2
- the 2nd TryFor
-comprehension of arity 2@Deprecated public static <T1,T2,T3> API.For3Try<T1,T2,T3> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3)
For
-comprehension of three Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd TryT3
- right component type of the 3rd Tryts1
- the 1st Tryts2
- the 2nd Tryts3
- the 3rd TryFor
-comprehension of arity 3@Deprecated public static <T1,T2,T3,T4> API.For4Try<T1,T2,T3,T4> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4)
For
-comprehension of 4 Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd TryT3
- right component type of the 3rd TryT4
- right component type of the 4th Tryts1
- the 1st Tryts2
- the 2nd Tryts3
- the 3rd Tryts4
- the 4th TryFor
-comprehension of arity 4@Deprecated public static <T1,T2,T3,T4,T5> API.For5Try<T1,T2,T3,T4,T5> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5)
For
-comprehension of 5 Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd TryT3
- right component type of the 3rd TryT4
- right component type of the 4th TryT5
- right component type of the 5th Tryts1
- the 1st Tryts2
- the 2nd Tryts3
- the 3rd Tryts4
- the 4th Tryts5
- the 5th TryFor
-comprehension of arity 5@Deprecated public static <T1,T2,T3,T4,T5,T6> API.For6Try<T1,T2,T3,T4,T5,T6> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6)
For
-comprehension of 6 Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd TryT3
- right component type of the 3rd TryT4
- right component type of the 4th TryT5
- right component type of the 5th TryT6
- right component type of the 6th Tryts1
- the 1st Tryts2
- the 2nd Tryts3
- the 3rd Tryts4
- the 4th Tryts5
- the 5th Tryts6
- the 6th TryFor
-comprehension of arity 6@Deprecated public static <T1,T2,T3,T4,T5,T6,T7> API.For7Try<T1,T2,T3,T4,T5,T6,T7> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7)
For
-comprehension of 7 Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd TryT3
- right component type of the 3rd TryT4
- right component type of the 4th TryT5
- right component type of the 5th TryT6
- right component type of the 6th TryT7
- right component type of the 7th Tryts1
- the 1st Tryts2
- the 2nd Tryts3
- the 3rd Tryts4
- the 4th Tryts5
- the 5th Tryts6
- the 6th Tryts7
- the 7th TryFor
-comprehension of arity 7@Deprecated public static <T1,T2,T3,T4,T5,T6,T7,T8> API.For8Try<T1,T2,T3,T4,T5,T6,T7,T8> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7, Try<T8> ts8)
For
-comprehension of 8 Trys.T1
- right component type of the 1st TryT2
- right component type of the 2nd TryT3
- right component type of the 3rd TryT4
- right component type of the 4th TryT5
- right component type of the 5th TryT6
- right component type of the 6th TryT7
- right component type of the 7th TryT8
- right component type of the 8th Tryts1
- the 1st Tryts2
- the 2nd Tryts3
- the 3rd Tryts4
- the 4th Tryts5
- the 5th Tryts6
- the 6th Tryts7
- the 7th Tryts8
- the 8th TryFor
-comprehension of arity 8@Deprecated public static <L,T1> API.For1Either<L,T1> For(Either<L,T1> ts1)
For
-comprehension of one Either.L
- left component type of the given Either typesT1
- right component type of the 1st Eitherts1
- the 1st EitherFor
-comprehension of arity 1@Deprecated public static <L,T1,T2> API.For2Either<L,T1,T2> For(Either<L,T1> ts1, Either<L,T2> ts2)
For
-comprehension of two Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd Eitherts1
- the 1st Eitherts2
- the 2nd EitherFor
-comprehension of arity 2@Deprecated public static <L,T1,T2,T3> API.For3Either<L,T1,T2,T3> For(Either<L,T1> ts1, Either<L,T2> ts2, Either<L,T3> ts3)
For
-comprehension of three Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd EitherT3
- right component type of the 3rd Eitherts1
- the 1st Eitherts2
- the 2nd Eitherts3
- the 3rd EitherFor
-comprehension of arity 3@Deprecated public static <L,T1,T2,T3,T4> API.For4Either<L,T1,T2,T3,T4> For(Either<L,T1> ts1, Either<L,T2> ts2, Either<L,T3> ts3, Either<L,T4> ts4)
For
-comprehension of 4 Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd EitherT3
- right component type of the 3rd EitherT4
- right component type of the 4th Eitherts1
- the 1st Eitherts2
- the 2nd Eitherts3
- the 3rd Eitherts4
- the 4th EitherFor
-comprehension of arity 4@Deprecated public static <L,T1,T2,T3,T4,T5> API.For5Either<L,T1,T2,T3,T4,T5> For(Either<L,T1> ts1, Either<L,T2> ts2, Either<L,T3> ts3, Either<L,T4> ts4, Either<L,T5> ts5)
For
-comprehension of 5 Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd EitherT3
- right component type of the 3rd EitherT4
- right component type of the 4th EitherT5
- right component type of the 5th Eitherts1
- the 1st Eitherts2
- the 2nd Eitherts3
- the 3rd Eitherts4
- the 4th Eitherts5
- the 5th EitherFor
-comprehension of arity 5@Deprecated public static <L,T1,T2,T3,T4,T5,T6> API.For6Either<L,T1,T2,T3,T4,T5,T6> For(Either<L,T1> ts1, Either<L,T2> ts2, Either<L,T3> ts3, Either<L,T4> ts4, Either<L,T5> ts5, Either<L,T6> ts6)
For
-comprehension of 6 Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd EitherT3
- right component type of the 3rd EitherT4
- right component type of the 4th EitherT5
- right component type of the 5th EitherT6
- right component type of the 6th Eitherts1
- the 1st Eitherts2
- the 2nd Eitherts3
- the 3rd Eitherts4
- the 4th Eitherts5
- the 5th Eitherts6
- the 6th EitherFor
-comprehension of arity 6@Deprecated public static <L,T1,T2,T3,T4,T5,T6,T7> API.For7Either<L,T1,T2,T3,T4,T5,T6,T7> For(Either<L,T1> ts1, Either<L,T2> ts2, Either<L,T3> ts3, Either<L,T4> ts4, Either<L,T5> ts5, Either<L,T6> ts6, Either<L,T7> ts7)
For
-comprehension of 7 Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd EitherT3
- right component type of the 3rd EitherT4
- right component type of the 4th EitherT5
- right component type of the 5th EitherT6
- right component type of the 6th EitherT7
- right component type of the 7th Eitherts1
- the 1st Eitherts2
- the 2nd Eitherts3
- the 3rd Eitherts4
- the 4th Eitherts5
- the 5th Eitherts6
- the 6th Eitherts7
- the 7th EitherFor
-comprehension of arity 7@Deprecated public static <L,T1,T2,T3,T4,T5,T6,T7,T8> API.For8Either<L,T1,T2,T3,T4,T5,T6,T7,T8> For(Either<L,T1> ts1, Either<L,T2> ts2, Either<L,T3> ts3, Either<L,T4> ts4, Either<L,T5> ts5, Either<L,T6> ts6, Either<L,T7> ts7, Either<L,T8> ts8)
For
-comprehension of 8 Eithers.L
- left component type of the given Either typesT1
- right component type of the 1st EitherT2
- right component type of the 2nd EitherT3
- right component type of the 3rd EitherT4
- right component type of the 4th EitherT5
- right component type of the 5th EitherT6
- right component type of the 6th EitherT7
- right component type of the 7th EitherT8
- right component type of the 8th Eitherts1
- the 1st Eitherts2
- the 2nd Eitherts3
- the 3rd Eitherts4
- the 4th Eitherts5
- the 5th Eitherts6
- the 6th Eitherts7
- the 7th Eitherts8
- the 8th EitherFor
-comprehension of arity 8@Deprecated public static <T1> API.For1List<T1> For(List<T1> ts1)
For
-comprehension of one List.T1
- right component type of the 1st Listts1
- the 1st ListFor
-comprehension of arity 1@Deprecated public static <T1,T2> API.For2List<T1,T2> For(List<T1> ts1, List<T2> ts2)
For
-comprehension of two Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd Listts1
- the 1st Listts2
- the 2nd ListFor
-comprehension of arity 2@Deprecated public static <T1,T2,T3> API.For3List<T1,T2,T3> For(List<T1> ts1, List<T2> ts2, List<T3> ts3)
For
-comprehension of three Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd ListT3
- right component type of the 3rd Listts1
- the 1st Listts2
- the 2nd Listts3
- the 3rd ListFor
-comprehension of arity 3@Deprecated public static <T1,T2,T3,T4> API.For4List<T1,T2,T3,T4> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4)
For
-comprehension of 4 Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd ListT3
- right component type of the 3rd ListT4
- right component type of the 4th Listts1
- the 1st Listts2
- the 2nd Listts3
- the 3rd Listts4
- the 4th ListFor
-comprehension of arity 4@Deprecated public static <T1,T2,T3,T4,T5> API.For5List<T1,T2,T3,T4,T5> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5)
For
-comprehension of 5 Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd ListT3
- right component type of the 3rd ListT4
- right component type of the 4th ListT5
- right component type of the 5th Listts1
- the 1st Listts2
- the 2nd Listts3
- the 3rd Listts4
- the 4th Listts5
- the 5th ListFor
-comprehension of arity 5@Deprecated public static <T1,T2,T3,T4,T5,T6> API.For6List<T1,T2,T3,T4,T5,T6> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5, List<T6> ts6)
For
-comprehension of 6 Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd ListT3
- right component type of the 3rd ListT4
- right component type of the 4th ListT5
- right component type of the 5th ListT6
- right component type of the 6th Listts1
- the 1st Listts2
- the 2nd Listts3
- the 3rd Listts4
- the 4th Listts5
- the 5th Listts6
- the 6th ListFor
-comprehension of arity 6@Deprecated public static <T1,T2,T3,T4,T5,T6,T7> API.For7List<T1,T2,T3,T4,T5,T6,T7> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5, List<T6> ts6, List<T7> ts7)
For
-comprehension of 7 Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd ListT3
- right component type of the 3rd ListT4
- right component type of the 4th ListT5
- right component type of the 5th ListT6
- right component type of the 6th ListT7
- right component type of the 7th Listts1
- the 1st Listts2
- the 2nd Listts3
- the 3rd Listts4
- the 4th Listts5
- the 5th Listts6
- the 6th Listts7
- the 7th ListFor
-comprehension of arity 7@Deprecated public static <T1,T2,T3,T4,T5,T6,T7,T8> API.For8List<T1,T2,T3,T4,T5,T6,T7,T8> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5, List<T6> ts6, List<T7> ts7, List<T8> ts8)
For
-comprehension of 8 Lists.T1
- right component type of the 1st ListT2
- right component type of the 2nd ListT3
- right component type of the 3rd ListT4
- right component type of the 4th ListT5
- right component type of the 5th ListT6
- right component type of the 6th ListT7
- right component type of the 7th ListT8
- right component type of the 8th Listts1
- the 1st Listts2
- the 2nd Listts3
- the 3rd Listts4
- the 4th Listts5
- the 5th Listts6
- the 6th Listts7
- the 7th Listts8
- the 8th ListFor
-comprehension of arity 8public static <T> API.Match<T> Match(T value)
T
- type of the valuevalue
- a value to be matchedMatch
instancepublic static <T,R> API.Match.Case<T,R> Case(API.Match.Pattern0<T> pattern, java.util.function.Function<? super T,? extends R> f)
public static <T,R> API.Match.Case<T,R> Case(API.Match.Pattern0<T> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,R> API.Match.Case<T,R> Case(API.Match.Pattern0<T> pattern, R retVal)
public static <T,T1,R> API.Match.Case<T,R> Case(API.Match.Pattern1<T,T1> pattern, java.util.function.Function<? super T1,? extends R> f)
public static <T,T1,R> API.Match.Case<T,R> Case(API.Match.Pattern1<T,T1> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,R> API.Match.Case<T,R> Case(API.Match.Pattern1<T,T1> pattern, R retVal)
public static <T,T1,T2,R> API.Match.Case<T,R> Case(API.Match.Pattern2<T,T1,T2> pattern, java.util.function.BiFunction<? super T1,? super T2,? extends R> f)
public static <T,T1,T2,R> API.Match.Case<T,R> Case(API.Match.Pattern2<T,T1,T2> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,R> API.Match.Case<T,R> Case(API.Match.Pattern2<T,T1,T2> pattern, R retVal)
public static <T,T1,T2,T3,R> API.Match.Case<T,R> Case(API.Match.Pattern3<T,T1,T2,T3> pattern, Function3<? super T1,? super T2,? super T3,? extends R> f)
public static <T,T1,T2,T3,R> API.Match.Case<T,R> Case(API.Match.Pattern3<T,T1,T2,T3> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,T3,R> API.Match.Case<T,R> Case(API.Match.Pattern3<T,T1,T2,T3> pattern, R retVal)
public static <T,T1,T2,T3,T4,R> API.Match.Case<T,R> Case(API.Match.Pattern4<T,T1,T2,T3,T4> pattern, Function4<? super T1,? super T2,? super T3,? super T4,? extends R> f)
public static <T,T1,T2,T3,T4,R> API.Match.Case<T,R> Case(API.Match.Pattern4<T,T1,T2,T3,T4> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,T3,T4,R> API.Match.Case<T,R> Case(API.Match.Pattern4<T,T1,T2,T3,T4> pattern, R retVal)
public static <T,T1,T2,T3,T4,T5,R> API.Match.Case<T,R> Case(API.Match.Pattern5<T,T1,T2,T3,T4,T5> pattern, Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
public static <T,T1,T2,T3,T4,T5,R> API.Match.Case<T,R> Case(API.Match.Pattern5<T,T1,T2,T3,T4,T5> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,T3,T4,T5,R> API.Match.Case<T,R> Case(API.Match.Pattern5<T,T1,T2,T3,T4,T5> pattern, R retVal)
public static <T,T1,T2,T3,T4,T5,T6,R> API.Match.Case<T,R> Case(API.Match.Pattern6<T,T1,T2,T3,T4,T5,T6> pattern, Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
public static <T,T1,T2,T3,T4,T5,T6,R> API.Match.Case<T,R> Case(API.Match.Pattern6<T,T1,T2,T3,T4,T5,T6> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,T3,T4,T5,T6,R> API.Match.Case<T,R> Case(API.Match.Pattern6<T,T1,T2,T3,T4,T5,T6> pattern, R retVal)
public static <T,T1,T2,T3,T4,T5,T6,T7,R> API.Match.Case<T,R> Case(API.Match.Pattern7<T,T1,T2,T3,T4,T5,T6,T7> pattern, Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
public static <T,T1,T2,T3,T4,T5,T6,T7,R> API.Match.Case<T,R> Case(API.Match.Pattern7<T,T1,T2,T3,T4,T5,T6,T7> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,T3,T4,T5,T6,T7,R> API.Match.Case<T,R> Case(API.Match.Pattern7<T,T1,T2,T3,T4,T5,T6,T7> pattern, R retVal)
public static <T,T1,T2,T3,T4,T5,T6,T7,T8,R> API.Match.Case<T,R> Case(API.Match.Pattern8<T,T1,T2,T3,T4,T5,T6,T7,T8> pattern, Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
public static <T,T1,T2,T3,T4,T5,T6,T7,T8,R> API.Match.Case<T,R> Case(API.Match.Pattern8<T,T1,T2,T3,T4,T5,T6,T7,T8> pattern, java.util.function.Supplier<? extends R> supplier)
public static <T,T1,T2,T3,T4,T5,T6,T7,T8,R> API.Match.Case<T,R> Case(API.Match.Pattern8<T,T1,T2,T3,T4,T5,T6,T7,T8> pattern, R retVal)
public static <T> API.Match.Pattern0<T> $()
T
- injected type of the underlying valuePattern0
instancepublic static <T> API.Match.Pattern0<T> $(T prototype)
T
- type of the prototypeprototype
- the value that should be equal to the underlying objectPattern0
instancepublic static <T> API.Match.Pattern0<T> $(java.util.function.Predicate<? super T> predicate)
This method is intended to be used with lambdas and method references, for example:
String evenOrOdd(int num) {
return Match(num).of(
Case($(i -> i % 2 == 0), "even"),
Case($(this::isOdd), "odd")
);
}
boolean isOdd(int i) {
return i % 2 == 1;
}
It is also valid to pass Predicate
instances:
Predicate<Integer> isOdd = i -> i % 2 == 1;
Match(num).of(
Case($(i -> i % 2 == 0), "even"),
Case($(isOdd), "odd")
);
Note: Please take care when matching Predicate
instances. In general,
function equality
is an undecidable problem in computer science. In Vavr we are only able to check,
if two functions are the same instance.
However, this code will fail:
Predicate<Integer> p = i -> true;
Match(p).of(
Case($(p), 1) // WRONG! It calls $(Predicate)
);
Instead we have to use Predicates.is(Object)
:
Predicate<Integer> p = i -> true;
Match(p).of(
Case($(is(p)), 1) // CORRECT! It calls $(T)
);
T
- type of the prototypepredicate
- the predicate that tests a given valuePattern0
instance