• Google Guava概述


    Guava是来自Google的Java库合集,包含了很多新的集合类型(比如multinmap和mulitset),不可变集合,图库和并发、I/O、哈希、缓存、原始类型等类型的工具集。Guava广泛的使用在Google的大部分Java项目中,也被其他的公司广泛采用。
    Guava有两种使用方式:

    • JRE方式,需要JDK1.8或者更高版本
    • 如果想要在JDK1.7或者Android中使用,需要采用Android方式

    Guava的Maven group ID 是 com.google.guava, artifact ID是guava
    若是使用Maven构建你的项目,你可以使用如下方式添加Guava依赖

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

    使用Gradle构建项目则采用如下方式

    dependencies {
      // Pick one:
    
      // 1. Use Guava in your implementation only:
      implementation("com.google.guava:guava:29.0-jre")
    
      // 2. Use Guava types in your public API:
      api("com.google.guava:guava:29.0-jre")
    
      // 3. Android - Use Guava in your implementation only:
      implementation("com.google.guava:guava:29.0-android")
    
      // 4. Android - Use Guava types in your public API:
      api("com.google.guava:guava:29.0-android")
    }
    

    如果想了解更多Guava的内容,请访问Guava Github地址

    参考

  • 相关阅读:
    剑指offer-用两个栈实现队列
    Java数组判空的正确打开方式
    浏览器输入URL后后的过程
    HTTP状态码
    HTTP和HTTPS
    北京好未来公司linux面试题
    三剑客 -- sed
    三剑客 -- grep
    shell脚本
    自动化 -- expect
  • 原文地址:https://www.cnblogs.com/weegee/p/12955013.html
Copyright © 2020-2023  润新知