1import java.util.List; 2import java.util.function.BiFunction; 3 4@FunctionalInterface 5public interface Lambda { 6 String process(String value); 7} 8 9public class Agenda { 10 11 Lambda functional = p -> p.toLowerCase(); 12 13 private List<String> persons; 14 15 public void lambdaMap(String personName) { 16 return persons.stream().map(p -> p.toLowerCase()); 17 } 18 19 public void lambdaMap2(){ 20 return persons.stream().map(p -> p.codePoints()); 21 } 22 23 public void reduce(){ 24 List<Integer> a; 25 return a.stream().reduce((x,y) -> x * y); 26 } 27 28 double test(BiFunction<Integer,List,String> func){ 29 return 0; 30 } 31 32 public double bifunc(){ 33 return test((x,y) -> String.valueOf(func(x,y))); 34 } 35 36 int func(int a, List b){ 37 return 1; 38 } 39 40 public void testFunctionalVar() { 41 Lambda a = p -> p.toLowerCase(); 42 } 43 44} 45