일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Flutter
- 파이썬
- function
- animation
- 함수
- Android
- text
- set
- 다트
- kotlin
- crawler
- package
- 크롤러
- texttheme
- List
- textstyle
- map
- DART
- 콜렉션
- Class
- 웹크롤러
- 클래스
- variable
- 코틀린
- import
- pushnamed
- python
- Collection
- ML
- 플러터
- Today
- Total
목록분류 전체보기 (125)
조용한 담장

코틀린의 collection 의 Aggregate Operations 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/collection-aggregate.html을 보며 정리. min() and max() return the smallest and the largest element respectively; average() returns the average value of elements in the collection of numbers; sum() returns the sum of elements in the collection of numbers; count() returns the number of elements in a collection; v..

코틀린의 collection 의 Ordering 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/collection-ordering.html 을 보며 정리. element 의 순서는 특정 collection type 에 따라서는 중요한 부분이다. 예를 들어 같은 element 를 가진 두개의 리스트는 element 의 order 에 따라 동일하지 않게 된다. 코틀린에서 object 의 order 는 다양한 방법으로 정의될 수 있다. natural order 는 Comparable interface 의 상속자를 위해 정의 되었다. 특별한 order 가 지정되지 않으면 기본으로 사용된다. Numeric type 은 전통적인 수 기반 순서(numerical orde..

코틀린의 collection 의 Retrieving Single Elements 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/collection-elements.html 을 보며 정리. Retrieving by position elementAt() 을 사용하여 collection 의 특정 위치의 element 를 얻는다. 첫번째 위치는 0, 마지막은 (size - 1) 이다. indexed access operator 인 get() 와 [] 도 비슷한 동작을 한다. val numbers = linkedSetOf("one", "two", "three", "four", "five") println(numbers.elementAt(3)) val numbersSo..

코틀린의 collection 의 Retrieving Collection Parts 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/collection-parts.html 을 보며 정리. Slice slice() 를 사용하여 지정된 위치의 element 로 새로운 list 를 구성한다. range 나 위치를 표현하는 상수 값을 가진 collection 을 전달하여 위치값을 전달 할 수 있다. val numbers = listOf("one", "two", "three", "four", "five", "six") println(numbers.slice(1..3)) println(numbers.slice(0..4 step 2)) println(numbers.slice..