Busy Java Developer's Guide to Guava

ted.neward@newardassociates.com | Blog: http://blogs.newardassociates.com | Github: tedneward | LinkedIn: tedneward

Objectives

Let's take a look at Guava

Google Guava

What is it?

Google Guava

Guava is a set of Google's extensions to Java

Google Guava

Features

Google Guava

Features

Installing Guava

Getting it into your code

Installing Guava

Getting Guava into your build

Installing Guava

Guava via Maven

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

Installing Guava

Guava via Gradle

dependencies {
  // Pick one:

  // 1. Use Guava in your implementation only:
  implementation("com.google.guava:guava:33.4.8-jre")

  // 2. Use Guava types in your public API:
  api("com.google.guava:guava:33.4.8-jre")

  // 3. Android - Use Guava in your implementation only:
  implementation("com.google.guava:guava:33.4.8-android")

  // 4. Android - Use Guava types in your public API:
  api("com.google.guava:guava:33.4.8-android")
}

Installing Guava

Guava via source

$ git clone https://github.com/google/guava
$ ./mvnw

com.google.common.base

"The core of the core"

com.google.common.base

Extension methods

com.google.common.base

String support

com.google.common.base

Object factory support

com.google.common.base

Functional (lite) programming support

com.google.common.base

Services

com.google.common.base

Reference type support

Resources

Where to get more on Guava

Resources

Web

Summary

Guava's a good base of functionality to consider

Credentials

Who is this guy?