Java developers can reduce boilerplate code with Google's core library
If you want to cut down on the collection or string processing code you write from scratch in every Java project, you can use the tools Google has used internally all at once. Guava is a core library collection that supports features not covered by the Java standard library, such as multimap, immutable collections, and graph processing. You can add the dependency and use it immediately in environments with JDK 1.8 or higher or in Android apps.
Tools that fill the gaps in the Java standard library
Guava provides new collection types like multimap and multiset, which existing Java collections found difficult to handle. It also includes immutable collections that guarantee data does not change and a dedicated library for graph processing. It offers broad support for utilities in areas frequently encountered in Java development, such as concurrency, input/output, hashing, primitives, and string processing. Google uses this library in most of its Java projects, and it is widely used by many other companies as well.
Two versions for JRE and Android
The library is divided into a JRE version and an Android version depending on the usage environment. The JRE version requires JDK 1.8 or higher and is suitable for general Java applications. If you are developing for Android or creating a library that requires Android compatibility, you must use the Android version. The two versions are distinguished in the Maven version field by -jre or -android. The current latest version is 33.7.1, and dependencies can be added in both Maven and Gradle.
API stability and change management
Guava clearly distinguishes API stability. APIs marked with the @Beta annotation can be changed or removed at any time, so if you are using a library from outside, you should avoid using them unless you repackage them. In contrast, APIs without @Beta maintain binary compatibility indefinitely and are not removed even if they are in a deprecated (@Deprecated) state. The last version to remove non-@Beta APIs was 21.0, and there are no plans for removal since then. However, options have been left open for exceptional situations, such as serious security issues.
Items to check before use
The serialization form of Guava objects can change at any time, except where explicitly guaranteed, so it is recommended not to rely on the serialization form for long-term data storage purposes. Additionally, these classes are not designed to defend against malicious callers, so they should not be used for communication between trusted and untrusted code. The mainline version is tested on various OpenJDK versions on Linux and Windows, but some features in the com.google.common.io package may not work properly in non-Linux environments. The Android version undergoes unit testing at API level 24 (Nougat). The only dependency required for runtime linking is com.google.guava:failureaccess:1.0.3.