gitmyhub

guava

Java ★ 51k updated 4h ago

Google core libraries for Java

Guava is Google's battle-tested open-source Java utility library that fills gaps in the standard library, adding better collections, string utilities, caching, hashing, and concurrency helpers.

JavaMavenGradlesetup: easycomplexity 2/5

Guava is Google's open-source collection of core utility libraries for the Java programming language. Java's standard library covers many basics, but Guava fills in important gaps that Java developers encounter repeatedly in real projects — areas where the built-in tools are either absent, awkward, or verbose.

The library covers a wide range of everyday programming needs. For collections, Guava adds types that Java's standard library lacks: a multimap (a map where each key can have multiple values), a multiset (a set that counts duplicates), immutable (unchangeable) versions of standard collections that are safe to share across threads, and a graph library for working with nodes and edges. Beyond collections, Guava provides utilities for string manipulation (splitting, joining, padding, formatting), hashing (computing checksums and fingerprints using a clean API), caching (storing computed results temporarily to avoid re-computing them), working with files and streams, and handling concurrency — the tricky business of running code in parallel.

You would use Guava whenever you are writing Java code and find yourself about to write a utility helper from scratch — chances are Guava already has a well-tested, well-maintained version. It is one of the most widely used third-party Java libraries in the industry, used heavily at Google internally and by countless other companies.

Guava is added to a project as a single dependency via Maven or Gradle (the two most common Java build tools). It comes in two variants: one for standard Java 8 and above, and one for Android development.

The tech stack is pure Java. There is no framework dependency — Guava is a library you add to your project, not a platform or runtime.

Where it fits