Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In my opinion the better choice is <a href="https://github.com/google/guava" rel="noreferrer"><strong>Guava</strong></a> (formerly known as Google collections):</p> <ul> <li>it's more modern (has generics)</li> <li>it absolutely follows the Collections API requirements</li> <li>it's actively maintained</li> <li><a href="https://google.github.io/guava/releases/snapshot/api/docs/com/google/common/cache/CacheBuilder.html" rel="noreferrer"><code>CacheBuilder</code></a> and it's predecessor <a href="https://google.github.io/guava/releases/snapshot/api/docs/com/google/common/collect/MapMaker.html" rel="noreferrer"><code>MapMaker</code></a> are just plain awesome</li> </ul> <p>Apache Commons Collections is a good library as well, but it has long failed to provide a generics-enabled version (which is a <em>major</em> drawback for a collections API in my opinion) and generally seems to be in a maintenance/don't-do-too-much-work-on-it mode <sub>Recently Commons Collections has picked up some steam again, but it has some catching up to do.</sub>.</p> <p>If download size/memory footprint/code size is an issue then Apache Commons Collections might be a better candidate, since it is a common dependency of other libraries. Therefore using it in your own code as well could potentially be done without adding any additional dependencies. Edit: This particular "advantage" has been partially subverted by now, since many new libraries actually depend on Guava and <em>not</em> on Apache Commons Collections.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload