java.lang.Object
org.apache.jena.util.iterator.NiceIterator<E>
org.apache.jena.mem2.iterator.SparseArrayIterator<E>
- Type Parameters:
E
- the type of the array elements
- All Implemented Interfaces:
Iterator<E>
,org.apache.jena.atlas.iterator.IteratorCloseable<E>
,org.apache.jena.atlas.lib.Closeable
,ClosableIterator<E>
,ExtendedIterator<E>
An iterator over a sparse array, that skips null entries.
-
Constructor Summary
ConstructorDescriptionSparseArrayIterator
(E[] entries, int toIndexExclusive, Runnable checkForConcurrentModification) SparseArrayIterator
(E[] entries, Runnable checkForConcurrentModification) -
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.ExtendedIterator
forEach, nextOptional
-
Constructor Details
-
SparseArrayIterator
-
SparseArrayIterator
-
-
Method Details
-
hasNext
public boolean hasNext()Returnstrue
if the iteration has more elements. (In other words, returnstrue
ifnext()
would return an element rather than throwing an exception.) -
next
Returns the next element in the iteration.- Specified by:
next
in interfaceIterator<E>
- Overrides:
next
in classNiceIterator<E>
- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException
- if the iteration has no more elements
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceIterator<E>
-