org.eclipse.january.dataset

## Class IntegerIterator

- java.lang.Object
- - org.eclipse.january.dataset.IndexIterator
  - - org.eclipse.january.dataset.IntegerIterator

-     public class IntegerIterator
      extends IndexIterator

  Class to run over an integer dataset and return its items

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.january.dataset.IndexIterator

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntegerIterator(Dataset index, int length)` Constructor for an iterator over the items of an integer dataset
    `IntegerIterator(Dataset index, int length, int isize)` Constructor for an iterator over the items of an integer dataset

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int[]` | `getPos()`
    `boolean` | `hasNext()`
    `void` | `reset()` Reset iterator

    - ### Methods inherited from class org.eclipse.january.dataset.IndexIterator

      `getShape`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IntegerIterator

          public IntegerIterator(Dataset index,
                         int length)

      Constructor for an iterator over the items of an integer dataset
      Parameters:
        `index` - integer dataset
        `length` - of entire data array

    - #### IntegerIterator

          public IntegerIterator(Dataset index,
                         int length,
                         int isize)

      Constructor for an iterator over the items of an integer dataset
      Parameters:
        `index` - integer dataset
        `length` - of entire data array
        `isize` - number of elements in an item

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in class `IndexIterator`
      Returns:
        true if there is another iteration

    - #### getPos

          public int[] getPos()

      Specified by:
        `getPos` in class `IndexIterator`
      Returns:
        position indices (nb this is reference not a copy so avoid changing and can be null)

    - #### reset

          public void reset()

      Description copied from class: `IndexIterator`
      Reset iterator
      Specified by:
        `reset` in class `IndexIterator`

Copyright © 2017. All rights reserved.