Commons Collections - Choosing a collection Commons Documentation Team

Commons-Collections and the Java Collections Framework provide a wide variety of collections to choose from. This choice can be bewildering, so this document seeks to help you choose.

Collection or Map

Do you want to store a map of key-value pairs? Then use a Map. For example you could decode country codes, where 'FR' maps to 'France' and 'GB' maps to 'United Kingdom'.
Or do you want to store a simple collection of elements? Then use a Collection. For example you could store types of tree, 'Oak', 'Pine' and 'Birch'.