Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
collections in JDK (beta)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kengo TODA
August 20, 2012
Technology
140
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
collections in JDK (beta)
To explain the basic collection in JDK
Kengo TODA
August 20, 2012
More Decks by Kengo TODA
See All by Kengo TODA
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
1
250
AI といっしょに仕事をする(子供向け)
eller86
0
58
Kotlin 開発のツラミを爆破した話! / Explode the difficulty of Kotlin dev!
eller86
0
230
生成AI 業務応用向けガイドライン 斜め読み / Overview of Generative AI Business Application Guidelines
eller86
0
230
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
2.5k
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
2k
ヒューマンスキル / The Humanskills
eller86
0
790
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
560
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
1.7k
Other Decks in Technology
See All in Technology
IoTとは〜? 数字で見るSORACOM UG【SORACOM UG Explorer 2026】
soracom
PRO
0
280
FinOpsを導入してマルチプロダクトのコスト最適化を実現する
kworkdev
PRO
0
140
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
430
リアクションエンジニア ― 小さなリアクションから、話しかけやすい組織をつくる ―
ryuguyana
1
130
Copilot Coworkで「みのるん式」やってみた
minorun365
PRO
2
1.6k
[dbts2026]数十PBの超巨大データ×AI活用を支えるSnowflakeの実力〜大規模環境におけるアーキテクチャと運用のリアル〜
y_matsubara
0
110
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
6
3.2k
ゼロから作るWebアプリの新定番!?Amplify Gen 2 × AWS Blocksで実現する「開発速度とRDBの柔軟性のいいとこ取り」
amixedcolor
1
170
AI AgentによるEmbedded SREの取り組み
tgidgd
1
350
セキュリティ専任チームなしで攻撃を先回りするSREが実践したSIEM on Amazon OpenSearch Service
cscengineer
PRO
0
550
試験勉強はGrokBotでやれ
maigo999
0
110
Metadata - Section 3 : Dublin Core Standard · DC
mohab1
0
110
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
970
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
340
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
How to Talk to Developers About Accessibility
jct
2
610
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.8k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Site-Speed That Sticks
csswizardry
13
1.6k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
570
Transcript
collections in JDK - basic data structures you should know
- 2012/Aug/29 Kengo TODA
Basic collection List<T> Set<T> Map<K, T>
ArrayList<T> It just wraps an array Good to #get(int): O(1)
Bad to #remove(int), #contains(T) : O(n)
LinkedList<T> Simple bidirectional list It costs more Java heap than
ArrayList Good to #remove(0), #add(0, T): O(1) Bad to #get(int), #contains(T) : O(n)
How to choose? ArrayList: Stack When we needs random access
LinkedList: Queue (Deque) When we call #remove(int) frequently
HashMap<K, V> It use hash table to manage key We
have to implement #hashCode() correctly It does not implement SortedMap interface
TreeMap<K, V> It use red-black tree to manage key We
have to implement Comparable or Comparator correctly It implements SortedMap
LinkedHashMap<K, V> A subclass of HashMap It has bidirectional list
to memory insertion- order (or access-order) It does not implement SortedMap interface
How to choose? HashMap Standard use TreeMap When we have
to use ordering LinkedHashMap When we have to memory insertion-order
Set ≒ Map HashSet TreeSet LinkedHashSet
Legacy implementations Vector Stack Hashtable Properties @Deprecated
Additional collection Google guava contains useful collections Table<C, R, V>
Multiset<T> Multimap<K, V>