public abstract static class Lang.F5<P1,P2,P3,P4,P5,R> extends Lang.FuncBase implements Lang.Func5<P1,P2,P3,P4,P5,R>
Base implementation of Lang.Func5 function. User application should (nearly) always make their implementation extend to this base class instead of implement Lang.Func5 directly
| Constructor and Description |
|---|
F5() |
| Modifier and Type | Method and Description |
|---|---|
Lang.F5<P1,P2,P3,P4,P5,R> |
andThen(Lang.Func5<? super P1,? super P2,? super P3,? super P4,? super P5,? extends R>... fs)
Returns a composed function that applied, in sequence, this function and all functions specified one by one.
|
<T> Lang.F5<P1,P2,P3,P4,P5,T> |
andThen(Lang.Function<? super R,? extends T> f)
Returns a composed function from this function and the specified function that takes the result of this function.
|
R |
applyOrElse(P1 p1,
P2 p2,
P3 p3,
P4 p4,
P5 p5,
Lang.F5<? super P1,? super P2,? super P3,? super P4,? super P5,? extends R> fallback)
Applies this partial function to the given argument when it is contained in the function domain.
|
Lang.F0<R> |
curry(P1 p1,
P2 p2,
P3 p3,
P4 p4,
P5 p5) |
Lang.F1<P1,R> |
curry(P2 p2,
P3 p3,
P4 p4,
P5 p5) |
Lang.F2<P1,P2,R> |
curry(P3 p3,
P4 p4,
P5 p5) |
Lang.F3<P1,P2,P3,R> |
curry(P4 p4,
P5 p5) |
Lang.F4<P1,P2,P3,P4,R> |
curry(P5 p5) |
Lang.F5<P1,P2,P3,P4,P5,Lang.Option<R>> |
lift()
Turns this partial function into a plain function returning an Option result.
|
Lang.F5<P1,P2,P3,P4,P5,R> |
orElse(Lang.Func5<? super P1,? super P2,? super P3,? super P4,? super P5,? extends R> fallback)
Returns a composed function that when applied, try to apply this function first, in case a
NotAppliedException is captured apply to the fallback function specified. |
breakOutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplypublic R applyOrElse(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, Lang.F5<? super P1,? super P2,? super P3,? super P4,? super P5,? extends R> fallback)
Applies this partial function to the given argument when it is contained in the function domain. Applies fallback function where this partial function is not defined.
p1 - the first argumentp2 - the second argumentp3 - the third argumentp4 - the fourth argumentp5 - the fifth argumentfallback - the function to be called if application of this function failed with any runtime exceptionpublic <T> Lang.F5<P1,P2,P3,P4,P5,T> andThen(Lang.Function<? super R,? extends T> f)
Returns a composed function from this function and the specified function that takes the result of this function. When applying the composed function, this function is applied first to given parameter and then the specified function is applied to the result of this function.
T - the return type of function ff - the function takes the R type parameter and return T type resultNullPointerException - if f is nullpublic Lang.F5<P1,P2,P3,P4,P5,R> andThen(Lang.Func5<? super P1,? super P2,? super P3,? super P4,? super P5,? extends R>... fs)
Returns a composed function that applied, in sequence, this function and all functions specified one by one. If applying anyone of the functions throws an exception, it is relayed to the caller of the composed function. If an exception is thrown out, the following functions will not be applied.
When apply the composed function, the result of the last function is returned
fs - a sequence of function to be applied after this functionpublic Lang.F5<P1,P2,P3,P4,P5,R> orElse(Lang.Func5<? super P1,? super P2,? super P3,? super P4,? super P5,? extends R> fallback)
Returns a composed function that when applied, try to apply this function first, in case a NotAppliedException is captured apply to the fallback function specified. This method helps to implement partial function
fallback - the function to applied if this function doesn’t apply to the parameter(s)Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.