Kotlin Idioms 배우기 - 4
- 본 포스팅은 많은 부분들이 생략되어있습니다.
Create DTOs (POJOs/POCOs)
1 | |
provides
- getters (and setters in case of
var) - equals()
- hashCode()
- toString()
- copy()
- component1(), component2(), …
Default values for function parameters
1 | |
Filter a list
1 | |
or
1 | |
Check the presence of an element in a collection
1 | |
String interpolation
1 | |
Instance checks
1 | |
Read-only list
1 | |
Read-only map
1 | |
Access a map entry
1 | |
Traverse a map or a list of pairs
1 | |
Iterate over a range
1 | |
Lazy property
1 | |
Extension functions
1 | |
Create a singleton
1 | |