Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Android
- 함수
- Yocto
- package
- text
- set
- DART
- 클래스
- pushnamed
- 크롤러
- animation
- 콜렉션
- kotlin
- 다트
- List
- Collection
- 플러터
- textstyle
- function
- Flutter
- Class
- import
- map
- 파이썬
- variable
- python
- 웹크롤러
- 코틀린
- ML
- crawler
Archives
- Today
- Total
목록리스트 (1)
조용한 담장
코틀린(Kotlin) Collections : List Specific Operations
코틀린의 collection 의 List Specific Operations 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/list-operations.html 을 보며 정리. Retrieving elements by index index 가 list 의 크기보다 클때 발생하는 exception 을 피하는 함수 getOrElse() getOrNull() val numbers = listOf(1, 2, 3, 4) println(numbers.get(0)) // 1 println(numbers[0]) // 1 //numbers.get(5) // exception! println(numbers.getOrNull(5)) // null println(numbers.g..
kotlin
2020. 5. 7. 18:08