[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2019-10-29 Thread Chen (Jira)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16961763#comment-16961763
 ] 

Chen commented on COLLECTIONS-698:
--

[~belugabehr] in that case ,if we add loop control inside Iterator ,that is not 
so beautiful .maybe we should only extend the offset of begining loop.  just 
like below:
{code:java}
//代码占位符
final List list = Arrays.asList("1", "2", "3","4","5"); 
final LoopingListIterator loop = new LoopingListIterator<>(list,2); 
for (int loops = 0;loops < 3*list.size();loops++)
{ System.out.print(loop.next()+", "); }
{code}
 
{code:java}
//代码占位符
3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2,
{code}
 

> 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 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)


[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2019-10-28 Thread David Mollitor (Jira)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16961434#comment-16961434
 ] 

David Mollitor commented on COLLECTIONS-698:


I was only interested in the read-only case.  Add and Remove are optional 
operations.

 

[https://docs.oracle.com/javase/7/docs/api/java/util/ListIterator.html]

> 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 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)


[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2019-10-23 Thread Chen (Jira)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16958460#comment-16958460
 ] 

Chen commented on COLLECTIONS-698:
--

hi [~belugabehr] how can we define one loop? if just readonly then that 
situation is simple , but if there is add , remove ,and previous , in these 
situation , I can't define when is one loop is over

> 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 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)


[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2019-10-22 Thread David Mollitor (Jira)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16957067#comment-16957067
 ] 

David Mollitor commented on COLLECTIONS-698:


[~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 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)


[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2019-10-21 Thread Chen (Jira)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16956603#comment-16956603
 ] 

Chen commented on COLLECTIONS-698:
--

hi [~belugabehr] ,what does the parameter loops mean?

for your example

if a list has 3 items (1,2,3) then \{{LoopingListIterator(list, 1, 2)}} would 
iterate: (2,3,1,2,3,1)?

> 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 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)


[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2018-10-13 Thread BELUGA BEHR (JIRA)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16649001#comment-16649001
 ] 

BELUGA BEHR commented on COLLECTIONS-698:
-

As always, if I have time.  I put it out there in the hopes that it piques 
someone's interest.  Good starter for a new contributor.

> 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: BELUGA BEHR
>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 list, int offset, int loops);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (COLLECTIONS-698) Expand LoopingListIterator

2018-10-13 Thread Gary Gregory (JIRA)


[ 
https://issues.apache.org/jira/browse/COLLECTIONS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16648995#comment-16648995
 ] 

Gary Gregory commented on COLLECTIONS-698:
--

Hi [~belugabehr],

Do you plan on providing a patch?

Gary

> 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: BELUGA BEHR
>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 list, int offset, int loops);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)