java.lang.Object
org.apache.jena.util.iterator.NiceIterator<T>
org.apache.jena.util.iterator.SingletonIterator<T>
- All Implemented Interfaces:
Iterator<T>,org.apache.jena.atlas.iterator.IteratorCloseable<T>,org.apache.jena.atlas.lib.Closeable,ClosableIterator<T>,ExtendedIterator<T>
A ClosableIterator that contains only one element
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.jena.util.iterator.NiceIterator
andThen, andThen, asList, asSet, close, close, emptyIterator, filterDrop, filterKeep, mapWith, remove, 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.ClosableIterator
closeMethods inherited from interface org.apache.jena.util.iterator.ExtendedIterator
andThen, filterDrop, filterKeep, forEach, mapWith, nextOptional, removeNext, toList, toSet
-
Constructor Details
-
SingletonIterator
Constructor- Parameters:
element- the single value to be returned
-
-
Method Details
-
hasNext
public boolean hasNext()Can return a single value -
next
Return the value -
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<T>
-