Java Collections
Collection | Interface | Ordered | Sorted | Thread safe | Duplicate | Nullable |
---|---|---|---|---|---|---|
ArrayList | List | Y | N | N | Y | Y |
Vector | List | Y | N | Y | Y | Y |
LinkedList | List, Deque | Y | N | N | Y | Y |
CopyOnWriteArrayList | List | Y | N | Y | Y | Y |
HashSet | Set | N | N | N | N | One null |
LinkedHashSet | Set | Y | N | N | N | One null |
TreeSet | Set | Y | Y | N | N | N |
CopyOnWriteArraySet | Set | Y | N | Y | N | One null |
ConcurrentSkipListSet | Set | Y | Y | Y | N | N |
HashMap | Map | N | N | N | N (key) | One null (key) |
HashTable | Map | N | N | Y | N (key) | N (key) |
LinkedHashMap | Map | Y | N | N | N (key) | One null (key) |
TreeMap | Map | Y | Y | N | N (key) | N (key) |
ConcurrentHashMap | Map | N | N | Y | N (key) | N |
ConcurrentSkipListMap | Map | Y | Y | Y | N (key) | N |
ArrayDeque | Deque | Y | N | N | Y | N |
PriorityQueue | Queue | Y | N | N | Y | N |
ConcurrentLinkedQueue | Queue | Y | N | Y | Y | N |
ConcurrentLinkedDeque | Deque | Y | N | Y | Y | N |
ArrayBlockingQueue | Queue | Y | N | Y | Y | N |
LinkedBlockingDeque | Deque | Y | N | Y | Y | N |
PriorityBlockingQueue | Queue | Y | N | Y | Y | N |
Comments