Class LoopIterator<T>

java.lang.Object
io.github.bakedlibs.dough.collections.LoopIterator<T>
Type Parameters:
T - The Type of element stored in the given Collection
All Implemented Interfaces:
Streamable<T>, Iterator<T>

public class LoopIterator<T> extends Object implements Iterator<T>, Streamable<T>
This is an infite implementation of Iterator. When you pass a Collection or Streamable to the constructor, this instance will represent an Iterator which will iterate over the given Collection, when the end of the Collection is reached, it will start again at the beginning. This will create an infinite Stream of elements. Note that this LoopIterator will create a copy of the given Collection and not operate on the original.
Author:
TheBusyBiscuit