Google Guava makes Java… usable

Hello World! I’m planning to use this blog to collect the various discoveries I make about software development in my day-to-day job as a software engineer at CERTON, Inc. The perhaps-vain hope is that I will help some other poor soul who stumbles across my posts and finds the solution to the exact problem they were encountering at that instant. I’ll also probably post mathematical curiosities and software engineering commentary. The ultimate goal is to keep the quality level high enough that I feel less guilty of time-wasting writing here than if I were participating in the standard social grooming networks.

But, of course, you’re not here for me, you’re here for you. So let’s talk about Google Guava. For the unfamiliar, Guava is a collection of utilities for performing common tasks in Java, similar in spirit to Apache Commons or C++’s Boost. I was introduced to Guava by a fellow CERTON developer for the purpose of performing some set operations more easily in the selection logic in CertSAFE Modeler. Since then, the use of Guava in our codebase has expanded greatly, making it far and away the library we get the most use out of.

Even if you’re already using Guava, there’s most likely parts of it that you’re not using currently only because you don’t know they exist. I know I find myself saying “Wow! I didn’t know Guava had that!” on a regular basis. Here’s a quick list of the most common uses of Guava in the code I write. Undoubtedly there’s things I haven’t listed here because I haven’t discovered them yet—and you might just find something in this list that you wish you had known about a year ago.
Continue reading Google Guava makes Java… usable