Solved

Google Collections Library and Apache Commons collection

Posted on 2014-03-26
2
324 Views
Last Modified: 2014-04-24
Google Collections library from Google Core Libraries for Java 1.6 (Guava) can be an alternative to Apache commons collection library.


Hi,
 I read as above. I wonder when to use use Google Collections Library and when to use Apache Commons collection. What are advantages, disadvantage, practical uses of each of them.
please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
2 Comments
 
LVL 35

Assisted Solution

by:mccarl
mccarl earned 250 total points
ID: 39957788
While one MAY be an alternative for the other, it that they cover the same general functionality, they would still do these same things in slightly/vastly different ways. Also, each one would also do somethings that the other doesn't.

So the decision would probably come down to... Which one covers more of the functionality that you are after in any particular project? It is quite likely that different projects that you are coding will have different requirements and so you would use Google for some projects and Apache for others. We can't really say much more because it is entirely dependant on exactly what you want to achieve.

Also, the last possibilty is that you don't choose between them at all and instead utilise BOTH libraries in the one project, so that some parts of the code can use one and other parts use the other.
0
 
LVL 26

Accepted Solution

by:
dpearson earned 250 total points
ID: 39958186
In general I think you'll find the Google (Guava) library will be the one to use if you have no strong reason to prefer Apache Commons.

The reason is just that Guava was written more recently - so they had access to everything in Apache Commons and also the Java collection classes when they wrote their libraries.

So usually I think Guava will be the better choice these days, although that's just a rule of thumb.

Doug
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question