Package io.virtdata.docsys.metafs.core
Class AugmentingIterator<O>
- java.lang.Object
-
- io.virtdata.docsys.metafs.core.AugmentingIterator<O>
-
- Type Parameters:
O- The type of Iterator to augment
- All Implemented Interfaces:
java.util.Iterator<O>
public class AugmentingIterator<O> extends java.lang.Object implements java.util.Iterator<O>This iterator wraps another iterator and provides a set of other elements of the same type interspersed with those provided by the wrapped iterator. It takes a function that can provide an extra set of elements for each one provided by the wrapped iterator. If the function returns a non-null value, then that element is taken as a list of extra elements to be returned before the next wrapped element is seen.
-
-
Constructor Summary
Constructors Constructor Description AugmentingIterator(java.util.Iterator<O> wrapped, java.util.function.Function<O,java.util.List<O>> function)
-