Package Torello.Java.Function
Interface TriIntFunc<R>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface TriIntFunc<R>
Function-Pointer Input:int, int, int
Output:R
.
Primitive's Extension to Java'sjava.util.function.*
package.
ThisFunctionalInterface
has anapply(...)
method which accepts three primitives: threeint
-primitives.
Hi-Lited Source-Code:- View Here: Torello/Java/Function/TriIntFunc.java
- Open New Browser-Tab: Torello/Java/Function/TriIntFunc.java
-
-
Method Summary
@FunctionalInterface (Lambda) Method Modifier and Type Method R
apply(int i1, int i2, int i3)
Default Composition & Builder Method(s) Modifier and Type Method default <V> TriIntFunc<V>
andThen(Function<R,V> after)
-
-
-
Method Detail
-
apply
R apply(int i1, int i2, int i3)
Applies a user-provided function to input aruments, returning a result of typeR
- Parameters:
i1
- The first integer-parameter.i2
- The second integer-parameter.i3
- The third integer-parameter.- Returns:
- The result of the function. Return result is of type
'R'
-
andThen
default <V> TriIntFunc<V> andThen(java.util.function.Function<R,V> after)
Returns a composed function that first applies'this'
function to its input, and then applies the'after'
function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.- Type Parameters:
V
- The output-type of the'after'
function, and also of the (returned)'composed'
function.- Parameters:
after
- The function to apply, after this function is applied.- Throws:
java.lang.NullPointerException
- This throws if null is passed to'after'
.- Code:
- Exact Method Body:
if (after == null) throw new NullPointerException ("null has been passed to parameter 'after'"); return (int i1, int i2, int i3) -> after.apply(this.apply(i1, i2, i3));
-
-