Getting Started with Google Guava
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Getting Started
Introducing Google Guava
The case for using Guava
What is this book about?
Installing Guava
Using Guava with Maven or Gradle
Summary
Basic Guava Utilities
Using the Joiner class
Using the Splitter class
Working with strings in Guava
Using the CharMatcher class
Using the Preconditions class
Object utilities
Functional Programming with Guava
Using the Function interface
Using the Functions class
Using the Predicate interface
Using the Predicates class
Using the Supplier interface
Using the Suppliers class
Working with Collections
The FluentIterable class
Lists
Sets
Maps
Multimaps
BiMap
Table
Range
Immutable collections
Ordering
Concurrency
Synchronizing threads
Monitor
ListenableFuture
FutureCallback
SettableFuture
AsyncFunction
FutureFallback
Futures
RateLimiter
Guava Cache
MapMaker
Guava caches
CacheBuilder
CacheBuilderSpec
CacheLoader
CacheStats
RemovalListener
The EventBus Class
EventBus
Subscribe – An example
Event Publishing – An example
Finer-grained subscribing
Unsubscribing to events
AsyncEventBus
DeadEvents
Dependency injection
Working with Files
Copying a file
Moving/renaming a File
Working with files as strings
Hashing a file
Writing to files
InputSupplier and OutputSupplier
ByteSource
ByteSink
Copying from a ByteSource class to a ByteSink class
ByteStreams and CharStreams
Closer
BaseEncoding
Odds and Ends
Creating proper hash functions
BloomFilter
Optional
Throwables
Index