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
- 파이썬
- pushnamed
- variable
- 콜렉션
- DART
- 웹크롤러
- 크롤러
- Flutter
- crawler
- 다트
- List
- Yocto
- 클래스
- Collection
- ML
- 코틀린
- import
- map
- text
- kotlin
- Class
- function
- package
- Android
- 함수
- set
- animation
- python
- 플러터
- textstyle
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