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
34
"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
320
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
560
Build apps for Cars
keithyokoma
0
460
Save the state
keithyokoma
0
510
Either in Kotlin
keithyokoma
0
520
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
5k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
4.9k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
490
DX Improvements
keithyokoma
3
380
Other Decks in Technology
See All in Technology
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
210
生成AIのガバナンスの全体像と現実解
fnifni
1
180
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
180
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
220
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
430
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
130
ハイテク休憩
sat
PRO
2
140
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
520
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
66
4.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Building an army of robots
kneath
302
44k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Six Lessons from altMBA
skipperchong
27
3.5k
The Invisible Side of Design
smashingmag
298
50k
Building Applications with DynamoDB
mza
91
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
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