|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.util.SparseArrayIterator
public class SparseArrayIterator
Iterator class for sparse values in an array. This type of iterator
can be used for an object array which has references interspersed with
null
s.
Field Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
private |
SparseArrayIterator(java.lang.Object[] array)
Internal constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final SparseArrayIterator EMPTY_ITERATOR
private java.lang.Object[] m_array
private int m_offset
Constructor Detail |
---|
private SparseArrayIterator(java.lang.Object[] array)
array
- array containing values to be iteratedMethod Detail |
---|
protected boolean advance()
null
value.
true
if element available, false
if
notpublic boolean hasNext()
hasNext
in interface java.util.Iterator
true
if element available, false
if
notpublic java.lang.Object next()
next
in interface java.util.Iterator
java.util.NoSuchElementException
- if past end of iterationpublic void remove()
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
- for unsupported operationpublic static java.util.Iterator buildIterator(java.lang.Object[] array)
array
- array containing values to be iterated (may be
null
)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |