Package net.sf.saxon.tree.jiter
Class MappingJavaIterator<S,T>
- java.lang.Object
-
- net.sf.saxon.tree.jiter.MappingJavaIterator<S,T>
-
- Type Parameters:
S
- the type of the input itemsT
- the type of the delivered item
- All Implemented Interfaces:
java.util.Iterator<T>
public class MappingJavaIterator<S,T> extends java.lang.Object implements java.util.Iterator<T>
A Java Iterator which applies a mapping function to each item in an input sequence
-
-
Constructor Summary
Constructors Constructor Description MappingJavaIterator(java.util.Iterator<S> in, java.util.function.Function<S,T> mapper)
Create a mapping iterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
void
remove()
-
-
-
Constructor Detail
-
MappingJavaIterator
public MappingJavaIterator(java.util.Iterator<S> in, java.util.function.Function<S,T> mapper)
Create a mapping iterator- Parameters:
in
- the input sequencemapper
- the mapping function to be applied to each item in the ipnut sequence to generate the corresponding item in the result sequence
-
-