Skip to content

어떤 기준으로 적절한 함수형 인터페이스를 사용해야 하는가? #37

Discussion options

You must be logged in to vote
  • 일단 표준 함수형 인터페이스를 사용하는게 좋다고 생각하고
  • 그 중에서도 좀 더 구체적인 의미를 내포? 하는 함수형 인터페이스를 사용하는게 좋다고 생각합니다. (제 생각일 뿐.. 의견들 얘기해주세요)
Comparator<Apple> c1 = (Apple a1, Apple a2) -> a1.getWeight().compareTo(a2.getWeight); // (1)
ToIntBiFunction<Apple> c1 = (Apple a1, Apple a2) -> a1.getWeight().compareTo(a2.getWeight); // (2)
  • 여기서 사과 두개의 무게를 비교하고 있기 때문에 (1)을 사용하지 않을까 싶습니다.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by coalong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants