Guava, among its many useful things, contains a great implementation of a cache. A cache, as you know, is an object that manages an association between keys and values, like an hash map, used when the values are generally very “heavy” to calculate and you want to avoid doing that repeatedly. The main difference between a cache and a generic map is that the cache generally has some kind of “eviction” policy, i.| andreabergia.com
Maps and List are the bread and butter of any Java program, but sometimes you need to creating a map that associates one key to multiple values and end up creating a Map> or similar. If you’ve ever needed that sort of collection, Guava has you covered with its Multimap. Guava’s Multimap is designed to represent a map where for one key there is a collection of values. There are two main variants (subinterfaces) of Multimaps: ListMultimap, which acts as if the collection is a List (meaning ...| andreabergia.com