[
https://issues.apache.org/jira/browse/COLLECTIONS-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656501#comment-13656501
]
Thomas Neidhart commented on COLLECTIONS-460:
---------------------------------------------
After some thought, I think we should better update IteratorChain to use a
Queue internally.
I am failing to see a use case for accessing the iterators in the chain.
> Add IteratorQueue
> -----------------
>
> Key: COLLECTIONS-460
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-460
> Project: Commons Collections
> Issue Type: New Feature
> Components: Iterator
> Reporter: Thomas Neidhart
> Fix For: 4.0
>
>
> An IteratorQueue is equivalent to an IteratorChain with the difference that
> the iterators to use are put into a queue instead of an list, and that they
> are removed from the queue if an iterator is exhausted.
> The IteratorChain keeps the iterators in the list even if they are exhausted,
> thus they can not be gc'ed until the whole chain is done. The interface of
> IteratorChain also contains a getIterators method, which returns the list of
> iterators used by this chain. So instead of changing the IteratorChain, I
> propose to add a separate class IteratorQueue with the described behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira