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

Jason Mehrens jason_mehrens at hotmail.com
Thu Sep 8 10:38:47 EDT 2005


Would getting votes for BUG 4475301 help sell the idea to sun or a new RFE?  
It looks like 82 votes are needed to get into the top 25 RFEs.  I would 
think a few the concurrency interest members would have sun accounts for the 
bug database so they could vote.

If the AsLifoQueue was modified to return the "tail-to-head" iterator, 
should the toArray methods return the elements in "tail-to-head" order?  Is 
descendingIterator the correct name as in implies the elements are ordered 
(by a Comparator)?

Jason "public Iterator<E> rotareti()" Mehrens

>From: Joshua Bloch <jbloch at gmail.com>
>Reply-To: josh at bloch.us
>To: Jason Mehrens <jason_mehrens at hotmail.com>
>CC: concurrency-interest at altair.cs.oswego.edu
>Subject: Re: [concurrency-interest] Deque missing tail to head iterator.
>Date: Wed, 7 Sep 2005 23:01:27 -0700
>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.
>       Regards,
>       Josh
>On 9/7/05, Jason Mehrens <jason_mehrens at hotmail.com> wrote:
> > Is the absence of "tail to head" iterator (Iterator<E> 
> > an intensional design decision?  I would think since the Deque has two 
> > a user would be able to iterate from either end.   The most apparent 
> > for the "tail to head" iterator is the asLifoQueue class as it currently
> > iterates from "head to tail".
> > An RFE was filed against the Stack
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4475301 for this 
> > Then again, that bug got zero votes so it must not be too important or 
> > that could be attributed to the number of Stack users.  Just kidding.
> >
> > Jason Mehrens
> >
> >
> > _______________________________________________
> > Concurrency-interest mailing list
> > Concurrency-interest at altair.cs.oswego.edu
> > http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
> >

More information about the Concurrency-interest mailing list