Package io.confluent.csid.utils
Class LoopingResumingIterator<KEY,VALUE>
java.lang.Object
io.confluent.csid.utils.LoopingResumingIterator<KEY,VALUE>
public class LoopingResumingIterator<KEY,VALUE>
extends Object
implements Iterator<Map.Entry<KEY,VALUE>>, Iterable<Map.Entry<KEY,VALUE>>
Loop implementations that will resume from a given key. Can be constructed and used as an iterable, or a function
passed into the static version
#iterateStartingFromKeyLooping.
The non functional version is useful when you want to use looping constructs such as break and
continue.
-
Constructor Summary
ConstructorsConstructorDescriptionLoopingResumingIterator(Map<KEY, VALUE> map) Will resume from the startingKey, if it's present -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
LoopingResumingIterator
Will resume from the startingKey, if it's present -
LoopingResumingIterator
-
-
Method Details
-
build
public static <KKEY,VVALUE> LoopingResumingIterator<KKEY,VVALUE> build(KKEY startingKey, Map<KKEY, VVALUE> map) -
hasNext
public boolean hasNext() -
next
-
iterator
-
getIterationStartingPoint
-