Google Guava is an
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
set of common libraries for
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
, mainly developed by
Google
Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
engineers.
Overview
Google Guava can be roughly divided into three components: basic utilities to reduce manual labor to implement common methods and behaviors, an extension to the
Java collections framework
The Java collections framework is a set of classes and interfaces that implement commonly reusable collection data structures.
Although referred to as a framework, it works in a manner of a library. The collections framework provides both inte ...
(JCF) formerly called the Google Collections Library, and other utilities which provide convenient and productive features such as functional programming, graphs, caching, range objects, and hashing.
The creation and architecture of the collection component were partly motivated by
generics
Generic or generics may refer to:
In business
* Generic term, a common name used for a range or class of similar things not protected by trademark
* Generic brand, a brand for a product that does not have an associated brand or trademark, other ...
introduced in JDK 1.5.
Although generics improve the productivity of programmers, the standard JCF does not provide sufficient functionality, and its complement
Apache Commons The Apache Commons is a project of the Apache Software Foundation, formerly under the Jakarta Project. The purpose of the Commons is to provide reusable, open source Java software. The Commons is composed of three parts: proper, sandbox, and dorm ...
Collections had not adopted generics in order to maintain
backward compatibility
Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially i ...
.
This fact led two engineers Kevin Bourrillion and Jared Levy to develop an extension to JCF, which provides additional generic classes such as
multiset
In mathematics, a multiset (or bag, or mset) is a modification of the concept of a set that, unlike a set, allows for multiple instances for each of its elements. The number of instances given for each element is called the multiplicity of that e ...
s,
multimap
In computer science, a multimap (sometimes also multihash, multidict or multidictionary) is a generalization of a map or associative array abstract data type in which more than one value may be associated with and returned for a given key. Both m ...
s,
bitmap
In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array
A bit array (also known as bitmask, bit map, bit set, bit string, or bit vector) is an array data structure that c ...
s, and immutable collections.
The library's design and code were advised and reviewed by
Joshua Bloch
Joshua J. Bloch (born August 28, 1961) is an American software engineer and a technology author, formerly employed at Sun Microsystems and Google. He led the design and implementation of numerous Java platform features, including the Java Collec ...
, the original lead designer of the Java Collections framework, and
Doug Lea
Douglas S. Lea is a professor of computer science and current head of the computer science department at State University of New York at Oswego, where he specializes in concurrent programming and the design of concurrent data structures. He was ...
, one of the lead designers of
concurrency utilities in JDK.
As of April 2012, Guava ranked the 12th most popular Java library, next to the
Apache Commons The Apache Commons is a project of the Apache Software Foundation, formerly under the Jakarta Project. The purpose of the Commons is to provide reusable, open source Java software. The Commons is composed of three parts: proper, sandbox, and dorm ...
projects and a few others.
Research performed in 2013 on 10,000 GitHub projects found that Google-made libraries, such as
Google Web Toolkit
Google Web Toolkit (GWT ), or GWT Web Toolkit, is an open-source set of tools that allows web developers to create and maintain JavaScript front-end applications in Java. It is licensed under the Apache License 2.0.
GWT emphasizes reusable ...
and Guava, constituted 7 of the top 100 most popular libraries in Java, and that Guava was the 8th most popular Java library.
As of March 2018, Guava was the 6th most starred Java project on GitHub.
See also
*
Apache Commons The Apache Commons is a project of the Apache Software Foundation, formerly under the Jakarta Project. The purpose of the Commons is to provide reusable, open source Java software. The Commons is composed of three parts: proper, sandbox, and dorm ...
, another set of common libraries for Java
*
Google Guice
Google Guice (pronounced like "juice") is an open-source software framework for the Java platform released by Google under the Apache License. It provides support for dependency injection using annotations to configure Java objects. Dependenc ...
, a Java framework for
dependency injection, developed by Google
References
External links
*
{{Google FOSS
Java (programming language) libraries
Guava
Guava () is a common tropical fruit cultivated in many tropical and subtropical regions. The common guava ''Psidium guajava'' (lemon guava, apple guava) is a small tree in the myrtle family ( Myrtaceae), native to Mexico, Central America, the ...
Software using the Apache license