A - 第一个函数的传入参数类型B - 第一个函数的返回类型(第二个函数有的参数类型)C - 最终结果类型public class ComposeFunction<A,B,C> extends Object implements Function<A,C>, Serializable
f: A->B 和 g: B->C,效果等同于:h(a) == g(f(a))| Constructor and Description |
|---|
ComposeFunction(Function<B,C> g,
Function<A,? extends B> f)
构造
|
| Modifier and Type | Method and Description |
|---|---|
C |
apply(A a) |
static <A,B,C> ComposeFunction<A,B,C> |
of(Function<B,C> g,
Function<A,? extends B> f)
两个函数的叠加函数.
|
public static <A,B,C> ComposeFunction<A,B,C> of(Function<B,C> g, Function<A,? extends B> f)
f: A->B 和 g: B->C,效果等同于:h(a) == g(f(a))A - 第一个函数的传入参数类型B - 第一个函数的返回类型(第二个函数有的参数类型)C - 最终结果类型g - 第二个函数f - 第一个函数Copyright © 2025. All rights reserved.