Class MultitransformIterator<T,F>
java.lang.Object
org.cyclops.cyclopscore.datastructure.MultitransformIterator<T,F>
- Type Parameters:
T
- The type over which the resulting iterator will iterate over.F
- The output of the input iterator, and the input of the function.
- All Implemented Interfaces:
Iterator<T>
An iterator that takes an iterator as input,
and applies each element of that iterator to a function that produces another iterator.
The elements of all resulting iterators are produced by this.
This is implemented in a lazy manner,
meaning that the function will only be applied to elements when they are needed.
-
Constructor Details
-
MultitransformIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
flattenIterableIterator
Flatten the given nested iterator.- Type Parameters:
T
- The type of the inner iterators.- Parameters:
it
- An iterator over iterators.- Returns:
- A flattened iterator.
-