Package org.jibx.runtime.impl
Class SparseArrayIterator
- java.lang.Object
-
- org.jibx.runtime.impl.SparseArrayIterator
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanadvance()Advance to next iteration value.static IteratorbuildIterator(Object[] array)Build iterator.booleanhasNext()Check for iteration element available.Objectnext()Get next iteration element.voidremove()Remove element from iteration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
m_array
protected Object[] m_array
Array supplying values for iteration.
-
m_offset
protected int m_offset
Offset of next iteration value.
-
-
Method Detail
-
advance
protected boolean advance()
Advance to next iteration value. This advances the current position in the array to the next non-nullvalue.- Returns:
trueif element available,falseif not
-
hasNext
public boolean hasNext()
Check for iteration element available.
-
next
public Object next()
Get next iteration element.- Specified by:
nextin interfaceIterator- Returns:
- next iteration element
- Throws:
NoSuchElementException- if past end of iteration
-
remove
public void remove()
Remove element from iteration. This optional operation is not supported and always throws an exception.- Specified by:
removein interfaceIterator- Throws:
UnsupportedOperationException- for unsupported operation
-
-