项目简介
Guava 是 Google 的核心 Java 库,包含新集合类型、不可变集合、图库以及并发、IO、哈希、基础类型、字符串等工具,广泛应用于 Java 项目,同时支持 JRE 与 Android 环境。
README 预览
# Guava: Google Core Libraries for Java\n\n[](https://github.com/google/guava/releases/latest)\n[](https://github.com/google/guava/actions/workflows/ci.yml)\n[](https://www.bestpractices.dev/projects/7197)\n\n\n\nGuava is a set of core Java libraries from Google that includes new collection\ntypes (such as multimap and multiset), immutable collections, a graph library,\nand utilities for concurrency, I/O, hashing, primitives, strings, and more! It\nis widely used on most Java projects within Google, and widely used by many\nother companies as well.\n\n\n\nGuava comes in two flavors:\n\n* The JRE flavor requires JDK 1.8 or higher.\n* If you need support for Android, use\n [the Android flavor](https://github.com/google/guava/wiki/Android). You can\n find the Android Guava source in the [`android` directory].\n\n[`android` directory]: https://github.com/google/guava/tree/master/android\n\n## Adding Guava to your build\n\nGuava's Maven group ID is `com.google.guava`, and its artifact ID is `guava`.\nGuava provides two different "flavors": one for use on a (Java 8+) JRE and one\nfor use on Android or by any library that wants to be compatible with Android.\nThese flavors are specified in the Maven version field as either `33.6.0-jre` or\n`33.6.0-android`. For more about depending on Guava, see\n[using Guava in your build].\n\nTo add a dependency on Guava using Maven, use the following:\n\n```xml\n\n com.google.guava\n guava\n 33.6.0-jre\n \n 33.6.0-android\n\n```\n\nTo add a dependency using Gradle:\n\n```gradle\ndependencies {\n // Pick one:\n\n // 1. Use Guava in your implementation only:\n implementation("com.google.guava:guava:33.6.0-jre")\n\n // 2. Use Guava types in your public API:\n api("com.google.guava:guava:33.6.0-jre")\n\n // 3. Android - Use Guava in your implementation only:\n implementation("com.google.guava:guava:33.6.0-android")\n\n // 4. Android - Use Guava types in your public API:\n api("com.google.guava:guava:33.6.0-android")\