commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [collections] Questions....
Date Tue, 19 Aug 2003 19:54:23 GMT
From: "Henri Yandell" <>
> Firstly, SingletonIterator and SingletonListIterator seem quite similar.
> Apart from the extra type of 'ListIterator', it appears that a
> SingletonListIterator can do the job of a SingletonIterator in all jobs.
> Could just remove SingleIterator.
True, but somebody may only want the Iterator interface to be implemented.
By having both we give the user the flexibility to choose.

> Second question. What's ListIteratorWrapper useful for?
> It seems to just let us throw a normal Iterator into something requiring
> ListIterator-ness, except then it'll go ahead and throw exceptions on most
> methods. So is it just an iterator that can get the previous element?
Yep, it allows forwards and backwards movement through any iterator, not
just list iterators. And no, I don't know why its useful.

> Next. MultiMap has a remove(Object, Object) contract and therefore is not
> a tag interface as the javadoc states.
Actually MultiMap is a poor interface that probably should be changed. It is
a difficult decision as we are not supposed to change interfaces, but it is
perhaps unlikely that there are too many implementations of this one. See

> The javadoc for a priority queue does not explain what a priority
> queue is.
Not sure if I remember either.

> FastXxx classes say that they are not cross-platform, but in no way
> discuss which platforms they are targetted at. This makes these classes
> useless except to the authors.
IIRC, nobody can ever answer this question. It may be a theoretical risk, or
a real one. Who knows?


View raw message