advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the Code!
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Comparing the Google Collections Library with the Apache Commons Collections

Like Apache's Jakarta Commons Collections, the recently released Google Collections Library also enhances the Java Collections Framework but offers some unique enhancements you may prefer. 


advertisement
hen I first learned about the Google Collections Library, I was puzzled. The Google Collections Library enhances the JDK's Java Collections Framework, and its developers plan to make it part of JDK 7. As a user of Apache's Jakarta Commons Collections, I didn't understand why Google created an API to enhance the Java Collections Framework when Apache had already done so. I read in an interview with one of the Google Collections Library creators that a motivation for creating a new library was to provide JDK 5 Generics support, which Jakarta Commons Collections lacks. I also read that Jakarta Commons Collections contains a few classes that violate the Java Collections Framework specification.

Upon investigating these claims I found that Jakarta Commons Collections indeed doesn't support JDK 5 Generics—a definite flaw. However, I found this SourceForge project, which claims to be a JDK 5 Generics-enabled version of Jakarta Commons Collections.


It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement