10.7

andThen(Function<? super R, ? extends V> after)
按照以往的逻辑,我们先来看下原始接口是怎么说的

 

输入是什么。输出就是什么,暂时,我还没有什么遇到高级的用法


import java.util.function.Function;

/**
* @author Zerox
* @date 2018/12/5 13:21
*/
public class TestFunctionIdentity {

public static void main(String[] args) {

Function<String,String> function = Function.identity();
String strValue = testIdentity(function);
System.out.println(strValue);
}

public static String testIdentity(Function<String,String> function) {
return function.apply("hello world");
}
}

posted @ 2021-10-07 21:37  杨枭  阅读(61)  评论(0)    收藏  举报