Package org.jibx.util
Class SparseArrayIterator
- java.lang.Object
-
- org.jibx.util.SparseArrayIterator
-
-
Field Summary
Fields Modifier and Type Field Description static SparseArrayIteratorEMPTY_ITERATOREmpty iterator.
-
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
-
EMPTY_ITERATOR
public static final SparseArrayIterator EMPTY_ITERATOR
Empty iterator.
-
-
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
-
-