Package io.tarantool.driver.utils
Class CyclingIterator<T>
- java.lang.Object
-
- io.tarantool.driver.utils.CyclingIterator<T>
-
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
TarantoolConnectionIterator
public class CyclingIterator<T> extends Object implements Iterator<T>
This iterator is lock-free and loops infinitely over a collection.
-
-
Constructor Summary
Constructors Constructor Description CyclingIterator(Collection<T> items)
Basic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
CyclingIterator
public CyclingIterator(Collection<T> items)
Basic constructor.- Parameters:
items
- collection to iterate over
-
-