public class SparseArrayIterator
extends java.lang.Object
implements java.util.Iterator
nulls.| Modifier and Type | Field and Description |
|---|---|
static SparseArrayIterator |
EMPTY_ITERATOR
Empty iterator.
|
private java.lang.Object[] |
m_array
Array supplying values for iteration.
|
private int |
m_offset
Offset of next iteration value.
|
| Modifier | Constructor and Description |
|---|---|
private |
SparseArrayIterator(java.lang.Object[] array)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
advance()
Advance to next iteration value.
|
static java.util.Iterator |
buildIterator(java.lang.Object[] array)
Build iterator.
|
boolean |
hasNext()
Check for iteration element available.
|
java.lang.Object |
next()
Get next iteration element.
|
void |
remove()
Remove element from iteration.
|
public static final SparseArrayIterator EMPTY_ITERATOR
private java.lang.Object[] m_array
private int m_offset
private SparseArrayIterator(java.lang.Object[] array)
array - array containing values to be iteratedprotected boolean advance()
null value.true if element available, false if
notpublic boolean hasNext()
hasNext in interface java.util.Iteratortrue if element available, false if
notpublic java.lang.Object next()
next in interface java.util.Iteratorjava.util.NoSuchElementException - if past end of iterationpublic void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - for unsupported operationpublic static java.util.Iterator buildIterator(java.lang.Object[] array)
array - array containing values to be iterated (may be
null)