"Craig R. McClanahan" <[EMAIL PROTECTED]> writes:
> On 24 Aug 2001, Daniel Rall wrote:
>
> > I really wanted to have the Util pacakge not depend upon any other
> > libraries. Do you think we should make an exception in case of the
> > Collections library?
>
> It certainly seems that the collections package should have an
> EnumerationIterator in it -- that's a very useful adapter between the old
> style and new style collection classes.
Yes, I agree. Bay had noted that a version already existed in the
Collections package. I found an EnumerationIterator by by James
Strachan which approximates the version I just checked in. It doesn't
implement the remove() method, which I'd be happy to submit a patch
for.
> You could make the same sort of case that a version of SequencedHashtable
> should go there also.
I would rather SequencedHashtable just moved into the Collections
package. I brought it up before (pre-Util), but at the time didn't
have the bandwidth to compare it to functionality existing in the
Collections package.
On looking now, I don't see a duplicate of it. LRUMap appears to be
very close to an unsyncrhonized version of BufferCache.
> As for whether commons-util should have their own copy, that seems a
> tougher call (although I note that "no dependencies" was part of the
> original intent).
I do not want to duplicate classes.
> Are there really that many use cases where commons-util
> would be included and commons-collections would not?
I don't think so, though the opposite might be true (at least until
the Util package is released and starts getting more acceptance).
I propose that CollectionUtils, SequencedHashtable and BufferCache
(and tests) move into the Collections package. This will free Util
from any duplication or external dependency. Though BufferCache
overlaps LRUMap to some extent, it would make it easier on me if we
could do a straight move for the time being, then handle any necessary
merging at a later. Hopefully James can help evaluate whether such a
merge is desirable. Note that I do not have commit access to
Collections, but I would like to have it as it is an area I am both
interested in and would likely be able to contribute in. Comments?
Daniel