[concurrency-interest] Deque missing tail to head iterator.

Joshua Bloch jbloch at gmail.com
Thu Sep 8 20:40:21 EDT 2005


Happy to help.  And I do hope we succeed in amending Deque as your suggested.


On 9/8/05, Jason Mehrens <jason_mehrens at hotmail.com> wrote:
> Josh,
> >Not sure I get this.  In fact, I'm a bit confused: the Bug parade says
> >there's a Collections.asLifoQueue(Queue) method, but the latest
> >Mustang snapshot shows no such method.  If there were such a method,
> >I'd imagine that it would do everything backward (iteration and
> >toArray).  The latest Mustang snapshot doesn't so a Deque interface
> >either, so I have no idea what's up.
> I can see why you are confused, because my original question:
> >>If the AsLifoQueue was modified to return the "tail-to-head" iterator,
> >>should the toArray methods return the elements in "tail-to-head" order?
> was based on a misunderstanding of the AsLifoQueue code from the CVS source
> on this site.  The AsLifoQueue implementation on this site is correct and
> works as expected (backward iteration and toArray).
> Thanks for answering my questions,
> Jason Mehrens

More information about the Concurrency-interest mailing list