함수형 interface의 구성

하나의 추상 행동과 조합 helper를 같은 계약에 둔다.

SAM descriptor

Abstract method

parameter와 return type을 정한다.

Default method

기존 행동을 조합한다.

Static method

factory를 제공한다.

Object method

재선언해도 SAM 수에서 제외된다.

핵심: @FunctionalInterface가 두 번째 추상 method 추가를 막는다.