Package org.apache.jena.util.iterator
Class Map1Iterator<From,To>
- java.lang.Object
-
- org.apache.jena.util.iterator.NiceIterator<To>
-
- org.apache.jena.util.iterator.Map1Iterator<From,To>
-
- All Implemented Interfaces:
java.util.Iterator<To>
,IteratorCloseable<To>
,Closeable
,ClosableIterator<To>
,ExtendedIterator<To>
public class Map1Iterator<From,To> extends NiceIterator<To>
An iterator that consumes an underlying iterator and maps its results before delivering them; supports remove if the underlying iterator does.
-
-
Constructor Summary
Constructors Constructor Description Map1Iterator(java.util.function.Function<From,To> map, java.util.Iterator<From> base)
Construct a list of the converted.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
default close: don't need to do anything.boolean
hasNext()
default hasNext: no elements, return false.To
next()
default next: throw an exception.void
remove()
default remove: we have no elements, so we can't remove any.-
Methods inherited from class org.apache.jena.util.iterator.NiceIterator
andThen, andThen, asList, asSet, close, emptyIterator, filterDrop, filterKeep, mapWith, removeNext, toList, toSet
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jena.util.iterator.ExtendedIterator
forEach, nextOptional
-
-
-
-
Method Detail
-
next
public To next()
Description copied from class:NiceIterator
default next: throw an exception.- Specified by:
next
in interfacejava.util.Iterator<From>
- Overrides:
next
in classNiceIterator<To>
-
hasNext
public boolean hasNext()
Description copied from class:NiceIterator
default hasNext: no elements, return false.- Specified by:
hasNext
in interfacejava.util.Iterator<From>
- Overrides:
hasNext
in classNiceIterator<To>
-
remove
public void remove()
Description copied from class:NiceIterator
default remove: we have no elements, so we can't remove any.- Specified by:
remove
in interfacejava.util.Iterator<From>
- Overrides:
remove
in classNiceIterator<To>
-
close
public void close()
Description copied from class:NiceIterator
default close: don't need to do anything.- Specified by:
close
in interfaceClosableIterator<From>
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classNiceIterator<To>
-
-