commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject [collections] CollectionUtils
Date Sun, 18 Aug 2002 15:35:30 GMT
I have spotted the following in CollectionUtils:

- addAll(Collection, Enumeration)
I feel this should be deprecated. IteratorUtils allows an iterator to be
created from an enumeration anyway, and this is the only method written like
this. Deprecate?

- collect, select, forAllDo, addAll
null handling is inconsistent. Some throw NPEs, others do very unexpected
things. This is now documented, but really I think that we should be
treating this as a bug and handling nulls consistently. (backward
compatability issues)

- select vs collect with outputCollection
The collect methods return the outputCollection, the select method doesn't.
Can we add a returns clause to the select? (no backward compatability issue)

- Iterator methods
Some methods have Iterator versions, others don't. Which way are we going
with this?

- Empty iterator
deprecated, use IteratorUtils instead

I have also added two new methods:
filter(Collection, Predicate)
transform(Collection, Transformer)
these complement the existing methods by offering changes in place.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message