java function1 Java - 함수형 인터페이스(Function) 합성 andThen, compose Function f = (s) -> Integer.parseInt(s); Function f2 = (i) -> i.toString() + "dddd"; Function result = f.andThen(f2); // f + f2 → result Function result2 = f2.compose(f); // f + f2 → result System.out.println(result.apply("99")); //99dddd System.out.println(result2.apply("99")); //99dddd 2017. 2. 28. 이전 1 다음