Top "Guava" questions

Google's Core Java Library for Java and Android development.

Map implementation with duplicate keys

I want to have a map with duplicate keys. I know there are many map implementations (Eclipse shows me about 50), …

java duplicates guava multimap
UnmodifiableMap (Java Collections) vs ImmutableMap (Google)

Context I need to return a reference to a map that I'm using for a data cache, and I'd like …

java collections map guava
initializing a Guava ImmutableMap

Guava offers a nice shortcut for initializing a map. However I get the following compiler error (Eclipse Indigo) when my …

java dictionary guava
How can I generate a list or array of sequential integers in Java?

Is there a short and sweet way to generate a List<Integer>, or perhaps an Integer[] or int[], …

java arrays collections guava apache-commons
Combine multiple Collections into a single logical Collection?

Assume, I have a constant number of collections (e.g. 3 ArrayLists) as members of a class. Now, I want to …

java collections guava
Interface/enum listing standard mime-type constants

I am looking among the standard libraries (like apache commons, jax, jboss, javax) for an interface or enum that lists …

java gwt mime-types content-type guava
builder for HashMap

Guava provides us with great factory methods for Java types, such as Maps.newHashMap(). But are there also builders for …

java collections guava
How to JUnit test that two List<E> contain the same elements in the same order?

Context I am writing a simple JUnit test for the MyObject class. A MyObject can be created from a static …

java junit guava
Predicate in Java

I am going through the code which uses Predicate in Java. I have never used Predicate. Can someone guide me …

java guava predicate
Bi-directional Map in Java?

I have a simple integer-to-string mapping in Java, but I need to be able to easily retrieve string from integer, …

java map guava apache-commons