Top "Guava" questions

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

I need an immutable key-value structure that retains insertion order

I want to find something like ImmutableLinkedHashMap<> in Guava library. I need to use an immutable key-value data …

java guava immutability linkedhashmap
using guava cache without a load function

My java app has a cache, and I'd like to swap out the current cache implementation and replace it with …

java caching guava
Caffeine versus Guava cache

According to these micro benchmarks it turns out that Caffeine is a way faster than Guava cache in both read …

caching guava caffeine
NoSuchMethodError: com.google.common.base.Stopwatch.createStarted()Lcom/google/common/base/Stopwatch

My app is throwing NoSuchMethodError: com.google.common.base.Stopwatch.createStarted()Lcom/google/common/base/Stopwatch error. Not sure why, …

java guava restlet apispark
Creating a String[] from Guava's Splitter

Is there a more efficient way to create a string array from Guava's Splitter than the following? Lists.newArrayList(splitter.…

java string guava
Guava Vs Apache Commons Hash/Equals builders

I was wondering what are key differences between Guava vs Apache Commons with respect to equals and hashCode builders. equals: …

java guava apache-commons
How do I efficiently cache objects in Java using available RAM?

I need to cache objects in Java using a proportion of whatever RAM is available. I'm aware that others have …

java caching guava soft-references
Capturing executor for current thread

I'm using ListenableFuture from Guava, and one nice thing about them is that one pass Executor to the Futures.addCallback …

java android guava executorservice
How should I use Guava's Hashing#consistentHash?

I'm looking into using a consistent hash algorithm in some java code I'm writing. The guava Hashing library has a …

java guava consistent-hashing
Idiomatic way to use for-each loop given an iterator?

When the enhanced for loop (foreach loop) was added to Java, it was made to work with a target of …

java guava foreach