How can I make an iterator that never ends?

Posted by Soldier.moth on Stack Overflow See other posts from Stack Overflow or by Soldier.moth
Published on 2009-06-19T06:29:46Z Indexed on 2010/04/21 21:53 UTC
Read the original article Hit count: 192

Filed under:
|
|
|

I was just wondering what the easiest way to iterate over a set indefinitely, i.e. when it reaches the end it next(); calls the first object. I'm assuming that this is not an already predefined function in Java, so just looking for the easiest way to implement this in Java.

© Stack Overflow or respective owner

Related posts about java

Related posts about iterator