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

Doug Lea dl at cs.oswego.edu
Thu Sep 8 06:29:49 EDT 2005

Joshua Bloch wrote:
> Jason,
> This was not an intentional design decision on my part  (I designed
> this interface jointly with Doug).  Historically, Java collections
> haven't had descending iterators.  List has the bidirectional
> ListIterator, which is a bit too complex for my tastes (even if I did
> design it).  SortedSet was missing this functionality till it was
> augmented by NavigableSet.  I think it might well be reasonable to add
> a descendingIterator method to Deque.  I wish you had come up with the
> idea six months ago.  It would be a nightmare to try to sell this idea
> to Sun now, especially because it affects all the subinterfaces and
> implementations of Deque:(  On the other hand, interfaces are forever.
>  If we don't do add the method now, we can't ever do it.  Let's see
> what Doug thinks.

I think:
   1. Josh and Jason are right -- we ought to support descendingIterator
   2. The timing is very inconvenient but I'll see what we can do.
   3. Thanks to all the people on this list for trying things out,
      reading our code, spotting problems, and telling us about
      them. It improves java.util.concurrent for the rest of the
      world. But if you want to be even more helpful, tell about
      things sooner rather than later :-)


More information about the Concurrency-interest mailing list