Rule of thumb for choosing an implementation of a Java Collection?

I really like this cheat sheet from Sergiy Kovalchuk’s blog entry, but unfortunately it is offline. However, the Wayback Machine has a historical copy:

Java Map/Collection Cheat Sheet

More detailed was Alexander Zagniotov’s flowchart, also offline therefor also a historical copy of the blog:

Alexander Zaniotov's flowchart for choosing Collection implementations

Excerpt from the blog on concerns raised in comments:
“This cheat sheet doesn’t include rarely used classes like WeakHashMap, LinkedList, etc. because they are designed for very specific or exotic tasks and shouldn’t be chosen in 99% cases.”

Leave a Comment