Top "Guava" questions

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

What is the best way to cache single object within fixed timeout?

Google Guava has CacheBuilder that allows to create ConcurrentHash with expiring keys that allow to remove entries after the fixed …

java guava
Guava libraries and GWT

Just discovered the Guava libraries project. Do these work with GWT?

java gwt guava
Java: how to transform from List<T> to Map<f1(T), List(f2(T))> without iterating

I have a list of objects that I need to transform to a map where the keys are a function …

java collections guava lambdaj
Google Collections ImmutableMap iteration order

I need combination of Google Collection ImmutableMap and LinkedHashMap — immutable map with defined iteration order. It seems that ImmutableMap itself …

java iteration guava
Thread-safe HashSet with Guava Collections

Like the title says, i would like to get a thread-safe HashSet using Guava Collections. Are any available?

java collections hashset guava
One liner for getting a sublist from a Set

Is there a one-liner (maybe from Guava or Apache Collections) that gets a sublist from a set. Internally it should …

java guava apache-commons-collection
Handle null value using Guava MapMaker/CacheBuilder

I try to make a cache using MapMaker/CacheBuilder but I don't understand how to properly handle null values. ConcurrentMap&…

java guava
Guava’s RateLimiter per minutes instead of seconds?

I'm trying to rate-limit the the number of accounts a user can create with my REST API. I would have …

java guava rate-limiting
Is there any generic version of toArray() in Guava or Apache Commons Collections?

What I'm looking for is a generic version of Object[] java.util.Collection.toArray() or a less verbose alternative to …

java guava apache-commons
Designing a Guava LoadingCache with variable entry expiry

I am using Guava's LoadingCache into my project to handle thread-{safe,friendly} cache loading and it works wonderfully well. …

java multithreading guava