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
-
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, 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.ClosableIterator
close
Methods 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:
forEachRemaining
in interfaceIterator<T>
-