Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.81 KB

File metadata and controls

32 lines (24 loc) · 1.81 KB

Data Structures

You can find common data structures under package java.util and its sub-packages.

All of these classes compose the Java Collections Framework

Memo

ArrayList vs. Vector

  • ArrayList is non-thread-safe
  • Vector is thread-safe
  • You can also get a thread-safe version of ArrayList via Collections.synchronizedList(List)

Bag or multiset

【todo】

  • ArrayDeque

data structures dedicated for android

  • ArrayMap/SimpleArrayMap/ArraySet
  • LruCache
  • SparseArray/LongSparseArray/SparseXXXArray
  • Pair