Guava 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
Guava 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
Guava 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 Apache
开发语言 Java
操作系统 跨平台
软件类型 开源软件
所属分类 程序开发常用工具包
开源组织
地区 不详
投 递 者 红薯
适用人群 未知
收录时间 2010-09-27

软件简介

Guava 是一套来自Google的核心Java库,其中包括新的集合类型(如multimap和multiset)、不可变的集合、图库,以及并发、I/O、散列、缓存、基元、字符串等实用工具!它被广泛用于Google内部的大多数Java项目,也被许多其他公司广泛使用。它被广泛用于Google内部的大多数Java项目,也被许多其他公司广泛使用。

Guava 的好处:

  • 标准化 - Guava库是由谷歌托管。

  • 高效 - 可靠,快速和有效的扩展JAVA标准库

  • 优化 -Guava库经过高度的优化。

  • 函数式编程 -增加JAVA功能和处理能力。

  • 实用程序 - 提供了经常需要在应用程序开发的许多实用程序类。

  • 验证 -提供标准的故障安全验证机制。

  • 最佳实践 - 强调最佳的做法。

guava类似Apache Commons工具集

Maven:

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>27.0-jre</version>
    <!-- or, for Android: -->
    <version>27.0-android</version>
</dependency>

示例代码:

public class GuavaTester {
   public static void main(String args[]){
      GuavaTester guavaTester = new GuavaTester();
      Integer a =  null;
      Integer b =  new Integer(10);
      System.out.println(guavaTester.sum(a,b));
   }

   public Integer sum(Integer a, Integer b){
      return a + b;
   }    
}

在线API doc:http://tool.oschina.net/apidocs/apidoc?api=guava

展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击加入讨论🔥(13) 发布并加入讨论🔥
发表了资讯
2023/05/31 07:04

Guava 32.0 发布,Google 的核心 Java 工具库

Guava 是 Google 的一套核心 Java 库,包括新的集合类型(如 multimap 和 multiset)、图库,以及用于并发、I/O、散列、缓存、基元、字符串等实用工具。它被广泛用于 Google 内部的 Java 项目,同时也被许多其他公司广泛使用。 目前,Guava 32.0 已发布,该版本带来以下变更: 安全修复 重新实现了 Files.createTempDir 和 FileBackedOutputStream ,以进一步解决 CVE-2020-8908 和 Guava issue #2575 (CVE 即将发布)。 不兼容...

3
5
发表了资讯
2022/03/01 07:49

Guava 31.1 发布,Google 的核心 Java 工具库

Guava 是 Google 的一套核心 Java 库,包括新的集合类型(如 multimap 和 multiset)、图库,以及用于并发、I/O、散列、缓存、基元、字符串等实用工具。它被广泛用于 Google 内部的 Java 项目,同时也被许多其他公司广泛使用。 目前,Guava 31.1 已发布,该版本带来以下变更: Base:弃用 lazyStackTrace 和 lazyStackTraceIsLazy 两个 Throwables 方法。( 6ebd7d8 ) collect:添加了一个新方法ImmutableMap.Builder.buildKeepi...

3
2
发表了资讯
2021/09/28 06:59

Guava 31 发布,Google 的核心 Java 库

Guava 是 Google 的一套核心 Java 库,包括新的集合类型(如 multimap 和 multiset)、图库,以及用于并发、I/O、散列、缓存、基元、字符串等的实用工具。它被广泛用于 Google 内部的 Java 项目,同时也被许多其他公司广泛使用。 更新日志 对 Guava 的空值进行了更彻底的注释 base:修改了 Functions.forSupplier 和 Predicates.instanceOf,以接受一个额外的类型参数来指定返回 Function/ Predicate 的输入类型。 collect:增加...

3
3
发表了资讯
2021/03/23 07:41

Guava 30.1.1 发布,Google 的 Java 核心工具库

Guava 30.1.1 现已发布。Guava 是 Google 的一个开源项目,包含许多 Google 核心 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 与 I/O 等。 更新内容如下: 增强了 Guava 30.1 在 Java 7 VM 下运行guava-android时的 warning log message 的侵占性。(Android VM 不受影响)...

4
7
发表了资讯
2020/12/16 08:27

Guava 30.1 发布,Google 的 Java 核心工具库

Guava 30.1 发布了,Guava 是 Google 的一个开源项目,包含许多 Google 核心 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 与 I/O 等。 更新内容如下: 在 Java 7 VM 下运行 guava-android 时,引入了一个 warning log message(Android VMs 不受影响)。这个 warning 为 ...

2
2
发表了资讯
2019/03/10 06:54

Guava 27.1 正式发布,Google 的 Java 核心工具库

Google 的 Java 核心工具库 Guava 27.1 已于昨天正式发布。 Guava 是 Google 的一个开源项目,包含许多 Google 核心 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 与 I/O 等。 Maven <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifa...

7
31
发表了资讯
2018/11/21 07:35

Guava 27.0.1 发布,Google 的 Java 核心工具库

Guava 27.0.1 发布了,Guava 是 Google 的一个开源项目,包含许多 Google 核心 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 与 I/O 等。 Maven <dependency>   <groupId>com.google.guava</groupId>   <artifactId>guava</artifactId>   <version>27.0.1-jre</ve...

0
11
发表了资讯
2018/10/19 07:57

Guava 27.0 发布,Google 的 Java 核心工具库

Guava 27.0 发布了,Guava 是 Google 的一个开源项目,包含许多 Google 核心 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 与 I/O 等。 更新内容如下: ListenableFuture 现在可以作为 Guava 单独工件(com.google.guava:listenablefuture:1.0)提供。 (b62d529) collect:...

4
15
发表了资讯
2018/08/02 09:31

Guava 26.0 发布,Google 的 Java 核心工具库

Guava 26.0 已发布,更新如下: base: Removed deprecated public static fields from CharMatcher. Use the equivalent public static methods instead. (f1249c4) base: Fixed the ServiceConfigurationError that some users encountered when using Guava as a JPMS module. (8287cdf) cache: Fixed a bug where Cache.asMap.compute* methods could cause nonsensical weights to be stored, breaking cache eviction. (1...

3
6
发表了资讯
2018/06/01 07:32

Guava 23.6.1 发布,修复反序列化 DOS 漏洞

Guava 23.6.1 发布了,目前这是 production ready 状态,25.1 还将是最新的版本。 此次更新修复了使用 Guava 和反序列化攻击者数据的服务器 DOS 漏洞( CVE-2018-10237. (a81698a))。 Guava 是 Google 的一个开源项目,包含许多 Google 核心的 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [s...

3
0
发表了资讯
2018/05/24 07:39

Guava 25.1 发布,Google 的 Java 核心工具库

Guava 25.1 已发布,更新如下: Switched to the type annotation version of @Nullable in the JRE/Java 8 flavor. base: Added Strings.lenientFormat(), copied from Preconditions.format(). net: Added Token Binding HTTP headers to HttpHeaders. reflect: Added overrides for methods on JDK types returning AnnotatedType in the JRE/Java 8 flavor. testing: Added support for type annotations in NullPointerTe...

4
6
发表了资讯
2018/04/29 07:18

Guava 24.1.1 发布,Google 的 Java 核心工具库

Guava 24.1.1 发布,此次更新修复了使用 Guava 和反序列化攻击者数据的服务器的 DOS 漏洞:CVE-2018-10237。 Maven <dependency>   <groupId>com.google.guava</groupId>   <artifactId>guava</artifactId>   <version>24.1.1-jre</version>   <!-- or, for Android: -->   <version>24.1.1-android</version> </dependency> Javadoc 24.1.1-jre 24.1.1-android JDiff 24.1.1-jre vs. 25.0-jre 24.1.1-and...

4
12
发表了资讯
2018/04/27 08:07

Guava 25.0 正式发布,Google 的 Java 核心工具库

Guava 25.0 已发布,更新如下: 修复了使用 Guava 和反序列化攻击者数据的服务器 DoS 漏洞 CVE-2018-10237 (f89ece5) cache: 将 java.time.Duration 重载(overload) 添加至 CacheBuilder (9bf6d95) io: 移除已弃用的 Files.fileTreeTraverser() 和 MoreFiles.directoryTreeTraverser()(ce6d93c) 更多细节可查阅发行列表 Guava 是 Google 的一个开源项目,包含许多 Google 核心的 Java 常用库,如:集合 [collections] 、缓存 [c...

3
16
发表了资讯
2018/04/26 16:38

Guava 25.0 和 24.1.1 发布,Google 的 Java 核心库

Guava 25.0 和 24.1.1 已发布,其中 Guava 25.0 的更新如下: 修复了由使用 Guava 和反序列化攻击者数据引起的服务器 DOS 漏洞:CVE-2018-10237. (f89ece5) cache: 添加 java.time.Duration 重载至 CacheBuilder. (9bf6d95) io: 移除弃用的 Files.fileTreeTraverser() 和 MoreFiles.directoryTreeTraverser(). (ce6d93c) Maven <dependency>   <groupId>com.google.guava</groupId>   <artifactId>guava</artifactId>  ...

3
4
发表了资讯
2018/03/15 08:07

Guava 24.1 发布,Google 的 Java 核心库

Guava 24.1 已发布,Guava 是 Google 的一个开源项目,包含许多 Google 核心的 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 、I/O 等等。 Maven <dependency>   <groupId>com.google.guava</groupId>   <artifactId>guava</artifactId>   <version>24.1-jre</ve...

8
14
发表了资讯
2018/02/06 09:24

谷歌的 Java 核心工具库 Guava 发布 24.0 正式版本

Guava 24.0 已正式发布,Guava 工程包含了若干被 Google 的 Java 项目广泛依赖的核心库,例如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 、I/O 等等。 在该版本中,移除了不少弃用的方法,也增加了不少新的方法,如在网络方面,新增了 HttpHeaders.HTTP2_SETTINGS,具体更新如下: base...

6
21
发表了资讯
2017/12/21 09:35

Guava 23.6 发布,Google 的 Java 核心库

Guava 23.6 已发布,Guava 是 Google 的一个开源项目,包含许多 Google 核心的 Java 常用库,如:集合 [collections] 、缓存 [caching] 、原生类型支持 [primitives support] 、并发库 [concurrency libraries] 、通用注解 [common annotations] 、字符串处理 [string processing] 、I/O 等等。 Maven <dependency>   <groupId>com.google.guava</groupId>   <artifactId>guava</artifactId>   <version>23.6-jre</ve...

8
30
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
13 评论
618 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部