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
ConstructorsConstructorDescriptionSparseArrayIterator(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, 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
forEach, nextOptional
-
Constructor Details
-
SparseArrayIterator
-
SparseArrayIterator
-
-
Method Details
-
hasNext
public boolean hasNext()Returnstrueif the iteration has more elements. (In other words, returnstrueifnext()would return an element rather than throwing an exception.) -
next
Returns the next element in the iteration.- Specified by:
nextin interfaceIterator<E>- Overrides:
nextin classNiceIterator<E>- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException- if the iteration has no more elements
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<E>
-