java.lang.Object
org.apache.jena.util.iterator.NiceIterator<X>
org.apache.jena.util.iterator.MapFilterIterator<T,X>
- All Implemented Interfaces:
Iterator<X>,org.apache.jena.atlas.iterator.IteratorCloseable<X>,org.apache.jena.atlas.lib.Closeable,ClosableIterator<X>,ExtendedIterator<X>
A MapFilterIterator takes a MapFilter and an [Extended]Iterator and returns a new
ExtendedIterator which delivers the sequence of all non-null elements MapFilter(X)
for X from the base iterator.
-
Constructor Summary
ConstructorsConstructorDescriptionMapFilterIterator(MapFilter<T, X> fl, ExtendedIterator<T> e) Creates a sub-Iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()default close: don't need to do anything.voidforEachRemaining(Consumer<? super X> action) booleanhasNext()Are there any more acceptable objects.next()The next acceptable object in the iterator.voidremove()remove's the member from the underlyingIterator;hasNext()may not be called between calls tonext()andremove().Methods inherited from class org.apache.jena.util.iterator.NiceIterator
andThen, andThen, asList, asSet, close, emptyIterator, filterDrop, filterKeep, mapWith, removeNext, toList, toSetMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.util.iterator.ExtendedIterator
andThen, filterDrop, filterKeep, forEach, mapWith, nextOptional, removeNext, toList, toSet
-
Constructor Details
-
MapFilterIterator
Creates a sub-Iterator.- Parameters:
fl- An object is included if it is accepted by this Filter.e- The parent Iterator.
-
-
Method Details
-
hasNext
public boolean hasNext()Are there any more acceptable objects. -
close
public void close()Description copied from class:NiceIteratordefault close: don't need to do anything.- Specified by:
closein interfaceClosableIterator<T>- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable- Overrides:
closein classNiceIterator<X>
-
remove
public void remove()remove's the member from the underlyingIterator;hasNext()may not be called between calls tonext()andremove(). -
next
The next acceptable object in the iterator. -
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<T>
-