Type | Source | Algorithme | Autorise la clé null | Autorise la valeur null | Thread-safe / synchronized |
---|---|---|---|---|---|
HashMap | http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html | Y | Y | N (Y si SortedMap m = Collections.synchronizedSortedMap(new HashMap(…));) | |
ConcurrentHashMap | http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentHashMap.html | Y | Y | Y | |
TreeMap | http://docs.oracle.com/javase/7/docs/api/java/util/TreeMap.html | Red-Black tree | N | Y | N (Y si SortedMap m = Collections.synchronizedSortedMap(new TreeMap(…));) |
LinkedHashMap | https://docs.oracle.com/javase/7/docs/api/java/util/LinkedHashMap.html | Y | Y | N (Y si SortedMap m = Collections.synchronizedSortedMap(new LinkedHashMap(…));) | |
Hashtable | http://docs.oracle.com/javase/7/docs/api/java/util/Hashtable.html | N | N | Y | |
HashSet | |||||
TreeSet | |||||
LinkedHashSet | |||||
ArrayList | |||||
Vector | |||||
LinkedList |
AProgrammer_ Java Collections Framework Cheat Sheet Archive du 05/03/2014 le 29/04/2020