Is the Apache Commons Collections framework faster than the JDK collections framework?
I have always been using the sto开发者_开发知识库ck JDK collections in my code. Does the Apache Commons Collections framework run faster?
No, it is not faster. And it doesn't support generics.
For a new project that needs something beyond JDK Collections, I can't understand why anyone would choose Commons Collections over the Google Collections Library.
No, it's just more comprehensive and more comfortable.
You're sort of missing the point, because Apache Commons Collections was never meant to be a replacement of the Java Collections framework.
Like it says on the project's home page:
Commons-Collections seek to build upon the JDK classes by providing new interfaces, implementations and utilities.
Anyway, like erickson pointed out, you're better off with Google Collections if you are using Java collections and want something to complement it. As to why it should be better than Commons Collections (which erickson forgot to address), see e.g. this answer and the interview mentioned in it.
精彩评论