Friday, April 30, 2010

Google Core Libraries for Java

I've been writing some Java code lately. Do you know that sinking feeling you get when you realize that a data structure you need isn't part of the Java library (JDK)? Or when some String operation isn't just a static method away?

No more. I just discovered that a lot of my favorite library code from Google's internal source tree has recently been open sourced as Google Core Libraries for Java 1.5 aka Guava.

Bidirectional maps (bimaps), hash multisets, multimaps, String operations, compact preconditions, a beautiful Splitter class, utility functions for value types - it's all in there!

Somehow, I missed the announcement because I was spending time in C#, Python, and Objective-C land. I'm happy this internal Google magic is now available to all. If you write Java code, you should probably just add Guava to your project. I promise you will find it very useful, very quickly.

1 comment:

Daniel said...

Thank you for this link. I have had my own "things missing from the JDK" library for a couple of years now and I am surprised by how two different people solve the same problems.