• Home
Name Date Size #Lines LOC

..--

android/03-May-2024-480,011355,318

android-annotation-stubs/03-May-2024-533272

futures/03-May-2024-433197

guava/03-May-2024-162,72287,094

guava-bom/03-May-2024-5850

guava-gwt/03-May-2024-47,15533,823

guava-testlib/03-May-2024-48,09132,778

guava-tests/03-May-2024-282,062244,420

refactorings/03-May-2024-285205

util/03-May-2024-9156

.classpathD03-May-2024298 87

.gitattributesD03-May-2024196 1412

.gitignoreD03-May-2024145 2117

.projectD03-May-2024364 1817

.travis.ymlD03-May-20241.5 KiB4431

Android.bpD03-May-20242.4 KiB9183

CONTRIBUTING.mdD03-May-20243.7 KiB8766

CONTRIBUTORSD03-May-20249 21

COPYINGD03-May-202411.1 KiB203169

CleanSpec.mkD03-May-20242.2 KiB500

METADATAD03-May-2024312 1918

MODULE_LICENSE_APACHE2D03-May-20240

NOTICED03-May-202411.1 KiB203169

OWNERSD03-May-202433 21

README.mdD03-May-20244.6 KiB11484

cycle_whitelist.txtD03-May-20242.7 KiB4942

javadoc-stylesheet.cssD03-May-202411.2 KiB492488

pom.xmlD03-May-202410.2 KiB305292

README.md

1# Guava: Google Core Libraries for Java
2
3[![Latest release](https://img.shields.io/github/release/google/guava.svg)](https://github.com/google/guava/releases/latest)
4[![Build Status](https://travis-ci.org/google/guava.svg?branch=master)](https://travis-ci.org/google/guava)
5
6Guava is a set of core libraries that includes new collection types (such as
7multimap and multiset), immutable collections, a graph library, functional
8types, an in-memory cache, and APIs/utilities for concurrency, I/O, hashing,
9primitives, reflection, string processing, and much more!
10
11Guava comes in two flavors.
12
13*   The JRE flavor requires JDK 1.8 or higher.
14*   If you need support for JDK 1.7 or Android, use the Android flavor. You can
15    find the Android Guava source in the [`android` directory].
16
17[`android` directory]: https://github.com/google/guava/tree/master/android
18
19## Adding Guava to your build
20
21Guava's Maven group ID is `com.google.guava` and its artifact ID is `guava`.
22Guava provides two different "flavors": one for use on a (Java 8+) JRE and one
23for use on Android or Java 7 or by any library that wants to be compatible with
24either of those. These flavors are specified in the Maven version field as
25either `27.1-jre` or `27.1-android`. For more about depending on
26Guava, see [using Guava in your build].
27
28To add a dependency on Guava using Maven, use the following:
29
30```xml
31<dependency>
32  <groupId>com.google.guava</groupId>
33  <artifactId>guava</artifactId>
34  <version>27.1-jre</version>
35  <!-- or, for Android: -->
36  <version>27.1-android</version>
37</dependency>
38```
39
40To add a dependency using Gradle:
41
42```gradle
43dependencies {
44  compile 'com.google.guava:guava:27.1-jre'
45  // or, for Android:
46  api 'com.google.guava:guava:27.1-android'
47}
48```
49
50## Snapshots
51
52Snapshots of Guava built from the `master` branch are available through Maven
53using version `HEAD-jre-SNAPSHOT`, or `HEAD-android-SNAPSHOT` for the Android
54flavor.
55
56- Snapshot API Docs: [guava][guava-snapshot-api-docs]
57- Snapshot API Diffs: [guava][guava-snapshot-api-diffs]
58
59## Learn about Guava
60
61- Our users' guide, [Guava Explained]
62- [A nice collection](http://www.tfnico.com/presentations/google-guava) of other helpful links
63
64## Links
65
66- [GitHub project](https://github.com/google/guava)
67- [Issue tracker: Report a defect or feature request](https://github.com/google/guava/issues/new)
68- [StackOverflow: Ask "how-to" and "why-didn't-it-work" questions](https://stackoverflow.com/questions/ask?tags=guava+java)
69- [guava-discuss: For open-ended questions and discussion](http://groups.google.com/group/guava-discuss)
70
71## IMPORTANT WARNINGS
72
731. APIs marked with the `@Beta` annotation at the class or method level
74are subject to change. They can be modified in any way, or even
75removed, at any time. If your code is a library itself (i.e. it is
76used on the CLASSPATH of users outside your own control), you should
77not use beta APIs, unless you [repackage] them. **If your
78code is a library, we strongly recommend using the [Guava Beta Checker] to
79ensure that you do not use any `@Beta` APIs!**
80
812. APIs without `@Beta` will remain binary-compatible for the indefinite
82future. (Previously, we sometimes removed such APIs after a deprecation period.
83The last release to remove non-`@Beta` APIs was Guava 21.0.) Even `@Deprecated`
84APIs will remain (again, unless they are `@Beta`). We have no plans to start
85removing things again, but officially, we're leaving our options open in case
86of surprises (like, say, a serious security problem).
87
883. Guava has one dependency that is needed at runtime:
89`com.google.guava:failureaccess:1.0`
90
914. Serialized forms of ALL objects are subject to change unless noted
92otherwise. Do not persist these and assume they can be read by a
93future version of the library.
94
955. Our classes are not designed to protect against a malicious caller.
96You should not use them for communication between trusted and
97untrusted code.
98
996. For the mainline flavor, we unit-test the libraries using only OpenJDK 1.8 on
100Linux. Some features, especially in `com.google.common.io`, may not work
101correctly in other environments. For the Android flavor, our unit tests run on
102API level 15 (Ice Cream Sandwich).
103
104[guava-snapshot-api-docs]: https://google.github.io/guava/releases/snapshot-jre/api/docs/
105[guava-snapshot-api-diffs]: https://google.github.io/guava/releases/snapshot-jre/api/diffs/
106[Guava Explained]: https://github.com/google/guava/wiki/Home
107[Guava Beta Checker]: https://github.com/google/guava-beta-checker
108
109<!-- References -->
110
111[using Guava in your build]: https://github.com/google/guava/wiki/UseGuavaInYourBuild
112[repackage]: https://github.com/google/guava/wiki/UseGuavaInYourBuild#what-if-i-want-to-use-beta-apis-from-a-library-that-people-use-as-a-dependency
113
114