Alex Rivera | Logout

Genericized commons collection

Asked 2008-11-17T16:48:55.013
13

I'm astonished that the Apache Commons Collections project still hasn't got around to making their library generics-aware. I really like the features provided by this library, but the lack of support for generics is a big turn-off. There is a Lavalabs fork of Commons Collections which does support generics, which seems to claim backward compatibility, but when I tried updating to this version, my web application failed to start (in JBoss).

My questions are:

  • Whether anyone has successfully updated from Commons Collections to the fork mentioned above
  • If Commons Collections has any plans to add support for generics

BTW, I'm aware of Google collections, but am reluctant to use it until the API stabilises.

Cheers, Don

Edit
Report

1 Answer

9

Consider Google Collections. From their Javalobby interview:

[Google Collections is] built with Java 5 features: generics, enums, covariant return types, etc. When writing Java 5 code, you want a collections library that takes full advantage of the language. In addition, we put enormous effort into making the library complete, robust, and consistent with the JDK collection classes.

answered 2008-11-28T02:21:04.260

Your Answer