Failure Sharing

Bootup your energy with sharing failure.

Customized Functional Interface

Definition

has only one abstract method 다른 메소드는 많이 있어도 상관 없다.

@FunctionalInterface // 이걸 써주면 메소드를 실수로 2개 쓰거나 했을 때 미리 실수를 알려준다.
interface 
void doSomething(Function<Integer, String> f)
// when calls it (ASIS)
doSomething(new Function<Integer, String>() {
 @Override
 public String apply(int i) {
   return ...
 }
}

// TOBE
doSomething(i -> String.valueOf(i))