Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
"It shared" in Kotlin
Search
Keishin Yokomaku
April 15, 2016
Technology
0
33
"It shared" in Kotlin
Keishin Yokomaku
April 15, 2016
Tweet
Share
More Decks by Keishin Yokomaku
See All by Keishin Yokomaku
One screen, many BottomSheets
keithyokoma
0
270
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
500
Build apps for Cars
keithyokoma
0
420
Save the state
keithyokoma
0
480
Either in Kotlin
keithyokoma
0
470
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
4.8k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
4.7k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
470
DX Improvements
keithyokoma
3
370
Other Decks in Technology
See All in Technology
開発者体験を意識した開発チームの生産性向上の取り組み
ham0215
3
650
APIのドキュメント化何使ってますか?
miu_crescent
2
160
Dify - LINE Bot連携 考え方と実用テクニック
uezo
5
1.1k
React Aria で実現する次世代のアクセシビリティ
ryo_manba
3
300
Our Journey from in-House CD System to Open Source
ffjlabo
0
100
手軽に始める? おうちサーバーのすゝめ
nyagasan
0
180
スーパーマリオRPGのリメイク版の変更点からみるUX
nishiharatsubasa
1
110
Discover Your Tailored Platform Strategy with Real-World Practice
hhiroshell
1
130
ことばをそろえる / Bridging the Terminology Gap
amaotone
5
1k
実践的なバグバウンティ入門
scgajge12
4
2.1k
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
15
39k
Staff Engineer / 20240827 Yuichiro Masui
shift_evolve
0
150
Featured
See All Featured
Docker and Python
trallard
39
3k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
A Modern Web Designer's Workflow
chriscoyier
690
190k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
The Invisible Side of Design
smashingmag
295
50k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
From Idea to $5000 a Month in 5 Months
shpigford
378
46k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
28
2.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.1k
How GitHub (no longer) Works
holman
309
140k
Transcript
IT SHARED IN KOTLIN KEISHIN YOKOMAKU
ςΩετ KOTLIN ▸ JetBrains ͕։ൃͨ͠ JVM Ͱಈ͘ݴޠ ▸ Ϟμϯͳจ๏ΛऔΓೖΕͨ Better
Java ͳݴޠ ▸ 1.0.0 ͕͍ͭ࠷ۙϦϦʔε͞Εͨ
ςΩετ MODERN SYNTAX IN KOTLIN ▸ Ϧετͷૢ࡞ ▸ filter, map,
let ͳͲศརͳϝιου͕͋Δ ▸ Java8 ͷ Stream API Έ͍ͨͳͷ͕ඪ४ࡌ fun main(args: Array<String>) { listOf(1, 2, 3) .filter {n -> n < 3} .let {n -> print(n)} } => [1, 2]
ςΩετ MODERN SYNTAX IN KOTLIN ▸ σʔλΫϥε ▸ ϓϩύςΟΛอ࣋͢ΔΫϥε(=Entity)༻ͷಛผͳએݴ ▸
Getter/Setter equals/hashCodeɺtoString ΛΑ͠ͳʹ ͬͯ͘ΕΔͷͰࣗͰॻ͔ͳ͍͍ͯ͘ data class Person(val name: String, val age: Int) val eq = Person(“Hirata”, 29) .equals(Person(“Jita”, 30)) print(eq) => false
ςΩετ KEYWORD ▸ it ▸ 1 ͭͷҾΛ࣋ͭϒϩοΫͷҾΛ it ͰࢀরͰ͖Δ fun
main(args: Array<String>) { listOf(1, 2, 3) .filter {n -> n < 3} .let {n -> print(n)} }
ςΩετ KEYWORD ▸ it ▸ 1 ͭͷҾΛ࣋ͭϒϩοΫͷҾΛ it ͰࢀরͰ͖Δ fun
main(args: Array<String>) { listOf(1, 2, 3) .filter {it < 3} .let {print(it)} }
ςΩετ data class Article (val name: String, val shared: Boolean);
ςΩετ data class Article (val name: String, val shared: Boolean);
fun main(args: Array<String>) { listOf(Article(“Think Social?”, true), Article(“Facebook”, true), Article(“mixi”, false)) .filter {it.shared} .let {print(it)} }
ςΩετ data class Article (val name: String, val shared: Boolean);
fun main(args: Array<String>) { listOf(Article(“Think Social?”, true), Article(“Facebook”, true), Article(“mixi”, false)) .filter {it.shared} .let {print(it)} } => [Article(name=“Think Social?”, shared=true), Article(name=“Facebook”, shared=true)]
IT SHARED