Package org.jibx.runtime.impl
Class ArrayRangeIterator
- java.lang.Object
-
- org.jibx.runtime.impl.ArrayRangeIterator
-
-
Field Summary
Fields Modifier and Type Field Description static ArrayRangeIteratorEMPTY_ITERATOREmpty iterator used whenever possible.protected Object[]m_arrayArray supplying values for iteration.protected intm_limitEnding offset for values.protected intm_offsetOffset of next iteration value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IteratorbuildIterator(Object[] array, int start, int limit)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 ArrayRangeIterator EMPTY_ITERATOR
Empty iterator used whenever possible.
-
m_array
protected Object[] m_array
Array supplying values for iteration.
-
m_offset
protected int m_offset
Offset of next iteration value.
-
m_limit
protected int m_limit
Ending offset for values.
-
-
Method Detail
-
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
-
-