Thursday, April 14, 2011

Introduction to Google Collections

We all know what is Java Collection Framework? Also, we have seen collection framework changing over past few years. We have seen Java introducing new APIs, and also generics getting introduced in the Tiger release. Now we have Google Collections, which are based on Java collection framework but enhance it to introduce new most commonly required features. These features are required during any real life use of Java Collection Framework. Multi key collections, collection having combined features of two Java Collections, and so many APIs that allow many day to day transformations of these collection objects constitute Google Collections.

Below are the important elements of Google Collections.

Collection Types OR Interfaces: These define the types of collections available. These interfaces define contract of manipulation of these types independent of their implementation. Most of the collection types are to serve a specific purpose.

Classes: These abstract or concrete classes provide partial or complete implementation of collection types. They construct enhanced data structures which can be directly used for a defined purpose.

Annotations: Three annotations constitute this group. These annotations tag a class as Google Web Toolkit compatible, Google Web Toolkit incompatible and Visible to Test.

Base OR Util: These are a set of interfaces and types that are used to support the main collection and annotation classes.

No comments:

Post a Comment

Chitika