| |
|
| java.lang.Object org.jibx.runtime.impl.SparseArrayIterator
SparseArrayIterator | public class SparseArrayIterator implements Iterator(Code) | | 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.
author: Dennis M. Sosnoski version: 1.1 |
Field Summary | |
protected Object[] | m_array Array supplying values for iteration. | protected int | m_offset Offset of next iteration value. |
Method Summary | |
protected boolean | advance() Advance to next iteration value. | public static Iterator | buildIterator(Object[] array) Build iterator. | public boolean | hasNext() Check for iteration element available. | public Object | next() Get next iteration element. | public void | remove() Remove element from iteration. |
m_array | protected Object[] m_array(Code) | | Array supplying values for iteration.
|
m_offset | protected int m_offset(Code) | | Offset of next iteration value.
|
advance | protected boolean advance()(Code) | | Advance to next iteration value. This advances the current position in
the array to the next non-null value.
true if element available, false ifnot |
buildIterator | public static Iterator buildIterator(Object[] array)(Code) | | Build iterator.
Parameters: array - array containing values to be iterated (may benull ) constructed iterator |
hasNext | public boolean hasNext()(Code) | | Check for iteration element available.
true if element available, false ifnot |
remove | public void remove()(Code) | | Remove element from iteration. This optional operation is not supported
and always throws an exception.
exception: UnsupportedOperationException - for unsupported operation |
|
|
|