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 |
Tags
- Flutter
- 웹크롤러
- 파이썬
- crawler
- 콜렉션
- DART
- 코틀린
- texttheme
- python
- animation
- kotlin
- 클래스
- textstyle
- 크롤러
- variable
- List
- 함수
- text
- set
- pushnamed
- function
- map
- import
- Class
- 다트
- ML
- package
- 플러터
- Android
- Collection
Archives
- Today
- Total
목록제네릭 (1)
조용한 담장
코틀린(Kotlin) 클래스(Class) : 제네릭(Generics)
코틀린 클래스의 제네릭(generic) 에 대해 알아보자. 원문 https://kotlinlang.org/docs/reference/generics.html 을 보며 정리. 코틀린의 제네릭 클래스: class Box(t: T) { var value = t } T 는 type parameter 이다. 클래스의 인스턴스를 생성할 때 type argument 를 제공해야 한다. val box: Box = Box(1) 생성자의 인자 값을 통해서나 다른 어떤 방식이든 parameter 의 타입이 추론이 가능할 때는 type argument 의 생략이 가능하다. val box = Box(1) // 1 has type Int, so the compiler figures out that we are talking ab..
kotlin
2020. 1. 2. 15:43