pvillega’s posterous

pvillega’s posterous

Pere Villega  //  Born in Barcelona, living in Dublin, and tagged as geek since youth. Developer in the path to becoming a software architect. I swear this is not a proper blog :)

Feb 16 / 7:24am

Google Collections

Google Collections is a library that extends the capabilities of Java Collections. The library consists of:

  • New Collection types: Multimap, Multiset, BiMap and others
  • High-performance immutable implementations of the standard collection types, for example ImmutableSet
  • MapMaker, a builder for concurrent hash maps with many advanced features
  • Ordering, which can only be described as a "Comparator on steroids"
  • Iterators and Iterables utility classes: element-based equality, cycle, concat, partition, filter with predicate, transform with function, and much more
  • Lists, Sets and Maps utility classes: a plethora of convenient factory methods and much more
  • Forwarding collections, such as ForwardingSet, allowing you to customize collection behaviour without subclassing

The API is not frozen until 1.0 is released, so changes are common, but the library is safe to use as it's being actively tested on applications like Gmail or Adwords, which take advantage of the new collections. They are a nice alternative to Apache Collections, Java 1.5 compliant and with a focus on scalability and performance (as they are used on Google's massive applications!), so adding them to your code can only be beneficial. Check the Javadoc or a presentation they did on 2008 about the project for more details.

Loading mentions Retweet

Comments (0)