Kotlin Collection 공식 문서를 정리 한 글입니다. Collection의 group operator에 대해 알아봅니다.
Github repo 에서 아래에 적힌 Kotlin 코드들을 확인 하실 수 있습니다.
Group elements operator
- Collection의 item들을 묶어 주는 operator
groupBy()등의 operator가 사용 됨- map collection의 형태로 가공 해 준다
- key / value를 transform 해줄 수 있음
1 | |
groupingBy()operator를 사용하여 한번에 모든 그룹에 똑같은 작업(eachCount()/reduce()/fold()/aggregate())을 진행할 수 있다.
1 | |
"Android" 카테고리의 최근 포스팅
카테고리 모든 글 보기| Kotlin - 코루틴 동작 원리 ( Continuation / CPS / State Machine ) | 2025. 04. 23 |
|---|---|
| JVM - Runtime Data Area - Thread | 2025. 04. 21 |
| JVM - Runtime Data Area - Heap | 2025. 04. 21 |
| JVM - Runtime Data Area - Method | 2025. 04. 19 |
| JVM - Interned string | 2025. 04. 18 |
| Android - 직렬화 | 2025. 04. 17 |
| Hilt - ComponentScope | 2025. 04. 16 |
| Kotlin - Channel | 2025. 04. 15 |
| Android - ViewModel 에 대해서 | 2025. 04. 14 |
| Android - Bundle 이란 | 2025. 04. 13 |