Overview | Package | Class | Deprecated
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jibx.runtime.impl
Class SparseArrayIterator

    java.lang.Object
      org.jibx.runtime.impl.SparseArrayIterator

All Implemented Interfaces:
  java.util.Iterator

    public class SparseArrayIterator

extends java.lang.Object
implements java.util.Iterator

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.

Version:
  1.1
Author:
  Dennis M. Sosnoski

Method Summary
`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
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### hasNext

    public boolean hasNext()

  Check for iteration element available.

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Returns:
    `true` if element available, `false` if not

### next

    public java.lang.Object next()

  Get next iteration element.

  Specified by:
    `next` in interface `java.util.Iterator`
  Returns:
    next iteration element
  Throws:
    `java.util.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:
    `remove` in interface `java.util.Iterator`
  Throws:
    `java.lang.UnsupportedOperationException` - for unsupported operation

### buildIterator

    public static java.util.Iterator buildIterator(java.lang.Object[] array)

  Build iterator.

  Parameters:
    `array` - array containing values to be iterated (may be `null`)
  Returns:
    constructed iterator

Overview | Package | Class | Deprecated
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project Web Site |