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
Constructors Constructor Description LoopingResumingIterator(Map<KEY,VALUE> map)LoopingResumingIterator(Optional<KEY> startingKey, Map<KEY,VALUE> map)Will resume from the startingKey, if it's present -
Method Summary
-
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
-