You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2019/10/22 13:39:00 UTC
[jira] [Comment Edited] (COLLECTIONS-698) Expand
LoopingListIterator
[ https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16957067#comment-16957067 ]
David Mollitor edited comment on COLLECTIONS-698 at 10/22/19 1:38 PM:
----------------------------------------------------------------------
[~Guoping1] Exactly.
Edit: You may want to consider having two versions of the method:
(list, loops)
(list, loops, offset)
was (Author: belugabehr):
[~Guoping1] Exactly.
> Expand LoopingListIterator
> --------------------------
>
> Key: COLLECTIONS-698
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-698
> Project: Commons Collections
> Issue Type: Improvement
> Components: Iterator
> Affects Versions: 4.2
> Reporter: David Mollitor
> Priority: Minor
>
> Please enhance {{LoopingListIterator}} to accept a starting offset and a number to indicate the number of loops.
> https://docs.oracle.com/javase/7/docs/api/java/util/List.html#listIterator(int)
> {code:java}
> public LoopingListIterator(List<E> list, int offset, int loops);
> {code}
> As I imagine it, if a list has 3 items (1,2,3) then {{LoopingListIterator(list, 1, 1)}} would iterate: (2,3,1)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)