| containsKey | get | put | add | remove | size | iteration | memory usage | |
|---|---|---|---|---|---|---|---|---|
| ConcurrentHashMap | 1 | 1 | 1 | 1 | 1 | n (of capacity, not size) | ||
| ConcurrentSkipListMap | log(n) | log(n) | log(n) | log(n) | n | n | ||
| EnumMap | ||||||||
| HashMap Hashtable | 1 | 1 | 1 | 1 | 1 | n (of capacity, not size) | ||
| IdentityHashMap | ||||||||
| LinkedHashMap | 1 | 1 | 1 | 1 | 1 | n (of size, not capacity) | ||
| TreeMap | log(n) | log(n) | log(n) | log(n) | 1 | n | ||
| WeakHashMap |
| contains | get | set | add | remove | size | iteration | memory usage | |
|---|---|---|---|---|---|---|---|---|
| ArrayList | n | 1 | 1 | 1 (amortized constant time)? | n | 1 | n | |
| LinkedList | n | n | n | 1 | n (removal is 1 at either end of the list) | 1 | n | |
| ArrayBlockingQueue | ||||||||
| ArrayDeque | ||||||||
| ArrayList | ||||||||
| ConcurrentLinkedQueue | ||||||||
| ConcurrentSkipListSet | ||||||||
| CopyOnWriteArrayList | ||||||||
| CopyOnWriteArraySet | ||||||||
| DelayQueue | ||||||||
| EnumSet | ||||||||
| HashSet | ||||||||
| LinkedBlockingDeque | ||||||||
| LinkedBlockingQueue | ||||||||
| LinkedHashSet | ||||||||
| LinkedList | ||||||||
| PriorityBlockingQueue | ||||||||
| PriorityQueue | ||||||||
| Stack | ||||||||
| SynchronousQueue | ||||||||
| TreeSet | ||||||||
| Vector |
- Add more collection types.
- Add memory usage of each.
- Split into one table for lists and one for maps.
Version 10.1 last modified by Geoff Fortytwo on 30/11/2008 at 17:20
Document data
Attachments:
No attachments for this document