[concurrency-interest] Deque missing tail to head iterator.
jbloch at gmail.com
Thu Sep 8 17:49:26 EDT 2005
On 9/8/05, Jason Mehrens <jason_mehrens at hotmail.com> wrote:
> 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.
It could, but I wouldn't mount a vote drive just yet. Doug and I can
talk to our contacts at Sun and see where we stand.
> If the AsLifoQueue was modified to return the "tail-to-head" iterator,
> should the toArray methods return the elements in "tail-to-head" order?
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.
> Is descendingIterator the correct name as in implies the elements are ordered
> (by a Comparator)?
This is a good question. On the one hand, it's the same name used by
Navigable set, which reduces the possibility that people will get it
wrong. On the other hand it does sort of imply ordering based on
value. Other possibilities include backwardIterator, reverseIterator,
and lastToFirstIterator. I prefer lastToFirst to tailToHead, as the
other Deque method names contain "first" and "last" rather than "head"
More information about the Concurrency-interest