Skip to content

jyoungjin/modern-java-untold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modern-java-untold


01. 왜 배워야 하나요? 뭐가 좋아요?

02. Function, The Transformer

  • FunctionalInterfaceExamples.java
  • Functional Interface : Interface 중, abstract 메서드를 하나만 가지는 인터페이스 -> 메서드 람다를 사용할 수 있음
  • Identity Function : 변형 없이 입력 값을 그대로 반환하는 함수
  • Function<T, R> : R apply(T t);

03. Consumer, The Spartan, Give Them Nothing but Take from Them Everything

04. Predicate, The Judge

05. Supplier, The Master of Lazy

06. 직접 만드는 Functional Interface 어때요? 참 쉽죠?

07. 실전 예제와 Functional Interface 의 제약 사항

08. Stream API - 01 시작하기전에, 02 Identity Function

08. Stream API - 03 Stream API 01 무한 collection, 02 Stream vs 예전방식

08. Stream API - 03 Stream API 03 기초

  • StreamExamples3.java
  • Intermediate Operation Method
    • Stream을 리턴하기 때문에 계속 Method Chaining을 통해서 무엇을 해야할지 Stream에게 지시할 수 있다.
  • Terminal Operation Method
  • 외부 반복 (for) vs 내부 반복 (stream)

08. Stream API - 03 Stream API 04 좀더 실용적인 예

08. Stream API - 03 Stream API 05 Parallel Programming (with ParallelStream)

08. Stream API - 03 Stream API 06 ParallelStream 성능 테스트

08. Stream API - 03 Stream API 07 ParallelStream 주의 사항

09. 01 Closure == Close Over (뒤덮다)

  • ClosureExamples.java
  • First Class Function : Function이 First Class Citizen을 의미한다.
    1. parameter로 넘길 수 있다.
    2. return 값으로 사용할 수 있다.
    3. variable / data structure에 저장할 수 있다.
  • java 8 이전에는 final 이어야만 했지만 java 8 이후에는 final or effectively final 이면 된다.
    • effectively final : 선언 후 재정의 하지 않은 변수
  • Anonymous Class와 Lambda Expression의 차이
    1. this가 가리키는 scope의 차이 : lambda expression의 경우 object 자체의 scope이 없다.
    2. anonymous의 경우 오버로딩이 불가했지만 lambda의 경우

09. 02 Closure 및 Lambda Expression 내부 구현

10. Higher-Order Function

  • HigherOrderFunctionExamples.java
  • 두 가지 조건 중 하나 이상 만족하는 function
    1. (고계함수 or 고차함수) 파라미터로 function을 받는 경우
    2. function을 실행했을때 return 값으로 function이 오는 경우

11. Method Reference


출처 : https://www.youtube.com/watch?v=mu9XfJofm8U&list=PLRIMoAKN8c6O8_VHOyBOhzBCeN7ShyJ27