Getting Started with Google Guava
- Length: 142 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2013-08-14
- ISBN-10: 1783280158
- ISBN-13: 9781783280155
- Sales Rank: #379741 (See Top 100 Books)
Write better, more efficient Java, and have fun doing so!
Overview
- Write more robust code that is easier to read and maintain
- Learn how to use Preconditions to prevent and find errors faster
- Shows how Guava Collections can make working with Java Collections a breeze
In Detail
Java continues to maintain its popularity and is still one of the main languages used in the software industry today. But there are things in Java that are difficult to do that can be made easier; that’s where Guava comes in. Guava provides developers with a way to write better code, with less effort.
Getting Started with Google Guava will show the reader how to start improving their code from the very first chapter. Packed with examples and loads of source code, this book will have an immediate impact on how you work with Java.
This book starts with using Guava to help with the common tasks that Java developers perform. Then you’ll work your way through more specialized situations and finally some great functionality Guava provides that can add a lot of power to your applications with little effort. You will learn about Guava’s famous Collections classes that add unique features, like the Bi-Map, to Java’s already great Collection classes. We’ll see how to add some functional programming aspects to our code. We will also learn about using a self-loading cache for improved performance in our applications, and how to use the EventBus to create software that takes advantage of event-based programming.
What you will learn from this book
- Master String manipulation with ease including creating a HashMap from formatted text
- Harness the power of functional programming with Functions and Predicates
- Use the power of Guava’s Collections classes
- Get to grips with better ways of writing and reading files with less boilerplate
- Improve synchronization with the Monitor
- Create and use a self-loading cache for better performance
- Leverage the power of event-based programming with the EventBus
- Never get another NullPointerException by using the Optional class
Approach
This is a short, practical guide, with lots of examples to help you learn Google Guava
Who this book is written for
There is no minimum level of experience required. There is something for everyone who works with Java, from the beginner to the expert programmer.
Table of Contents
Chapter 1: Getting Started
Chapter 2: Basic Guava Utilities
Chapter 3: Functional Programming with Guava
Chapter 4: Working with Collections
Chapter 5: Concurrency
Chapter 6: Guava Cache
Chapter 7: The EventBus Class
Chapter 8: Working with Files
Chapter 9: Odds and Ends