728x90
any
any ๋ฉ์๋๋ ์์ ํ๋๋ผ๋ ๋๋ค์์ ํด๋นํ๋ฉด true๋ฅผ ๋ฐํํ๋ค.
val array:Array = arrayOf(10, 30, 27)
val boolArray:Boolean = array.any{ array-> array<20 }
//boolArray ๋ true
all
all ๋ฉ์๋๋ ๋ชจ๋ ์์๊ฐ ๋๋ค์์ ํด๋นํด์ผ true ๋ฅผ ๋ฐํํ๋ค.
val array:Array = arrayOf(10, 30, 27)
val boolArray:Boolean = array.all{ array-> array<20 }
//boolArray ๋ false
โ
โ
โ
โ
https://ponyozzang.tistory.com/518
all , any
https://zerogdev.blogspot.com/2019/07/kotlin-filter-map-all-any-count-find.html
์ฝํ๋ฆฐ ๋ฉ์๋(filter, map, all, any, count, find, groupBy,flatMap)
728x90
'Android' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Android / Error] Couldn't load memtrack module Locat Error / ์๋ฎฌ๋ ์ดํฐ ์๋ ์๋จ(Emulator Not Working) (0) | 2021.06.18 |
---|---|
[Android] RecyclerView ์ญ์์ผ๋ก ๋ฐฐ์น / LayoutManager ์์ฑ (kotlin) (0) | 2021.06.18 |
[Android]Retrofit2์ REST API ํต์ 1 ( Kotlin ) (0) | 2021.06.18 |
URL ์ฃผ์์ ์๋ฏธ์ ๊ตฌ์ฑ (0) | 2021.06.18 |
[Android] ์๋๋ก์ด๋ REST API (0) | 2021.06.18 |