[Kotlin] SAM(Single Abstract Method) 이란?
이름에서 알 수 있듯 SAM은 하나의 추상 메서드에 대해서 lambdas 식을 제공합니다. 단, Java에서 작성한 Interface 정의와 이를 활용하는 `setOnClickListener`를 kotlin에서 부르는 경우에만 이에 해당합니다.
[Kotlin] 람다 (Lambda) 식
Lambda 식은 쉽게 말해 function에 function을 전달하고, 이를 콜 하게 하는 것을 말한다. 자바에서 흔하게 볼 수 있는 샘플은 아래와 같다.
[Kotlin] Kotlin 프로그래밍 언어 알아보기
Kotlin은 두 키워드(val 및 var)를 사용하여 변수를 선언합니다. Int는 정수를 나타내는 유형이며 Kotlin에서 표현될 수 있는 많은 숫자 유형 중 하나입니다. 다른 언어와 마찬가지로 숫자 데이터에 따라 Byte, Short, Long, Float, Double 을 사용할 수도 있습니다.
[Design Pattern] Facade
Facade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.
[Design Pattern] Decorator
Decorator is a structural design pattern that lets you attach new behaviors to objects by placing these objects inside special wrapper objects that contain the behaviors.