Package org.apache.jena.util.iterator
Class MapFilterIterator<T,X>
- java.lang.Object
-
- org.apache.jena.util.iterator.NiceIterator<X>
-
- org.apache.jena.util.iterator.MapFilterIterator<T,X>
-
- All Implemented Interfaces:
java.util.Iterator<X>
,ClosableIterator<X>
,ExtendedIterator<X>
public class MapFilterIterator<T,X> extends NiceIterator<X> implements 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
Constructors Constructor Description MapFilterIterator(MapFilter<T,X> fl, ExtendedIterator<T> e)
Creates a sub-Iterator.
-
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()
Are there any more acceptable objects.X
next()
The next acceptable object in the iterator.void
remove()
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, 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
andThen, filterDrop, filterKeep, forEach, mapWith, nextOptional, removeNext, toList, toSet
-
-
-
-
Constructor Detail
-
MapFilterIterator
public MapFilterIterator(MapFilter<T,X> fl, ExtendedIterator<T> e)
Creates a sub-Iterator.- Parameters:
fl
- An object is included if it is accepted by this Filter.e
- The parent Iterator.
-
-
Method Detail
-
hasNext
public boolean hasNext()
Are there any more acceptable objects.- Specified by:
hasNext
in interfacejava.util.Iterator<T>
- Overrides:
hasNext
in classNiceIterator<X>
- Returns:
- true if there is another acceptable object.
-
close
public void close()
Description copied from class:NiceIterator
default close: don't need to do anything.- Specified by:
close
in interfaceClosableIterator<T>
- Overrides:
close
in classNiceIterator<X>
-
remove
public void remove()
remove's the member from the underlyingIterator
;hasNext()
may not be called between calls tonext()
andremove()
.- Specified by:
remove
in interfacejava.util.Iterator<T>
- Overrides:
remove
in classNiceIterator<X>
-
next
public X next()
The next acceptable object in the iterator.- Specified by:
next
in interfacejava.util.Iterator<T>
- Overrides:
next
in classNiceIterator<X>
- Returns:
- The next acceptable object.
-
-