public class NullArrayIterator extends IteratorAdapter
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Object[] |
_array |
(package private) int |
_arraylen |
(package private) int |
_lastindex |
(package private) int |
_nextindex |
Constructor and Description |
---|
NullArrayIterator(java.lang.Object[] array)
Construct an iterator over the given array
|
NullArrayIterator(java.lang.Object[] array,
int length)
Construct an iterator over the given array, where the
effective array length is given by the length argument
(and must be smaller than the real length of the array).
|
Modifier and Type | Method and Description |
---|---|
protected void |
advance()
Advance the next index to the next non-null element.
|
protected int |
getLastIndex()
Return the index of the element last returned.
|
boolean |
hasNext()
Return true if there are more non-null elements in the array.
|
java.lang.Object |
next()
Return the next non-null element in the array.
|
remove
java.lang.Object[] _array
int _lastindex
int _nextindex
int _arraylen
public NullArrayIterator(java.lang.Object[] array)
public NullArrayIterator(java.lang.Object[] array, int length)
protected void advance()
protected int getLastIndex()
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in class IteratorAdapter
public java.lang.Object next()
next
in interface java.util.Iterator
next
in class IteratorAdapter