Interface Function<T,R>
Type Parameters:
T - the type of the input to the function
R - the type of the result of the function
given argumentに対し処理を行い、結果を返す
下記の例はgiven stringのlengthを返す
public class Outer {
public static void main(String[] args) {
Function<String, Integer> f = x -> x.length();
System.out.println(f.apply("abc"));
}
}
3