关于Google Guava

来源:互联网 发布:js单例和实际化 编辑:程序博客网 时间:2024/05/29 13:48

The Google Guava is an open-source set of common libraries(共享库) for Java, mainly developed by Google engineers.
Google Guava是一套开源Java共享库,主要开发人员来自Google。


Overview
概述

The Google Guava can be roughly divided into three components: basic utilities(基本实用程序) to reduce menial(卑微的) labors to implement(实现) common methods and behaviors, an extension to the Java Collections Framework (JCF Java集合框架) formerly called the Google Collections Library, and other utilities which provide convenient and productive features such as functional programming(函数式编程), caching, range objects, and hashing(散列法).
Google Guava可以大致分为三部分:基本实用程序,JCF(Java集合框架)扩展和其他实用程序。基本实用程序实现常用的方法和行为,减少琐碎的重复工作;JCF扩展曾被称作Google集合框架;其他的实用程序提供了便利高效的一些特性,比如函数式编程,缓存,范围对象(?)和哈希算法。


The creation and architecture of the collection component were partly motivated by generics(泛型) 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 Collections has not adopted generics in order to maintain backward compatibility. This fact led two engineers Kevin Bourrillion and Jared Levy to develop an extension to JCF, which provides additional generic classes such as multisets(多重集合), multimaps(多重映射), bimaps(双向映射), and immutable collections(不可变集合).
这个集合组件的产生和架构,部分借鉴了JDK 1.5引入的泛型。泛型能够提升开发效率,但标准的JCF提供的功能有限,而Apache Commons Collections为了向后兼容,没有采取泛型。鉴于此,Kevin BourrillionJared Levy 开发了JCF扩展,提供了更多的泛型对象,比如多重集合,多重映射,双向映射和不可变集合。


Generics是程序设计语言的一种技术,指将程序中数据类型进行参数化,它本质上是对程序的数据类型进行一次抽象,扩展语言的表达能力,同时支持更大粒度的代码复用。


The library's design and code were advised(提供咨询) and reviewed(评审) by Joshua Bloch, the original lead designer of the Java Collections framework, and Doug Lea, one of the lead designers of concurrency utilities(并发实用程序) in JDK.
原JCF首席设计师 Joshua Bloch 和JDK并发实用程序主要设计者之一 Doug Lea ,曾在Google Guava的设计和编码时提供咨询和评审。


As of April 2012, Guava ranks the 12th most popular Java library, next to the Apache Commons projects and a few others. Research performed in 2013 on 10,000 GitHub projects found that Google-made libraries, such as Google Web Toolkit and Guava, consist of 7 of the top 100 most popular libraries in Java, and that Guava is the 8th most popular Java library.
2012年4月,Guava在最受欢迎Java类库排行榜中名列第12位,仅次于Apache Commons和其他项目。2013年,通过一万个Github项目的研究结果显示,Google开发的类库,比如Google Web Toolkit和Guava,有7个位于100个最受欢迎的Java类库中,其中Guava排名第8。


References

  1. Google Guava - wikipedia
  2. Google Guava libraries - google code
  3. Java语言与Generics - ibm.com
  4. Apache Commons Collections - apache.org
  5. Joshua Bloch访谈:选择编程语言就像选择酒吧 - programmer.com.cn
  6. Doug Lea - wikipedia
0 0
原创粉丝点击