Interface TriFunction<T1,T2,T3,R>
- Type Parameters:
T1- the type of the first argument - 第一个参数的类型T2- the type of the second argument - 第二个参数的类型T3- the type of the third argument - 第三个参数的类型R- the type of the result - 结果的类型
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Tri Function - Three-Argument Function Interface
三元函数 - 三参数函数接口
Represents a function that accepts three arguments and produces a result.
This is the three-arity specialization of Function.
表示接受三个参数并产生结果的函数。这是 Function 的三元特化版本。
Example | 示例:
TriFunction<String, Integer, Boolean, String> fn =
(name, age, active) -> name + ":" + age + ":" + active;
String result = fn.apply("John", 25, true);
Features | 主要功能:
- Three-argument function interface - 三参数函数接口
- andThen composition support - andThen组合支持
- Functional interface (lambda compatible) - 函数式接口(兼容lambda)
Security | 安全性:
- Thread-safe: Implementation dependent - 线程安全: 取决于实现
- Since:
- JDK 25, opencode-base-parallel V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> TriFunction<T1, T2, T3, V> Returns a composed function that first applies this function to its input, and then applies theafterfunction to the result.Applies this function to the given arguments.
-
Method Details
-
apply
-
andThen
Returns a composed function that first applies this function to its input, and then applies theafterfunction to the result. 返回一个组合函数,首先将此函数应用于其输入,然后将 after 函数应用于结果。- Type Parameters:
V- the type of output of theafterfunction - after 函数输出的类型- Parameters:
after- the function to apply after this function - 在此函数之后应用的函数- Returns:
- a composed function - 组合函数
- Throws:
NullPointerException- if after is null - 如果 after 为 null
-