org.eclipse.january.dataset

## Class IntegersIterator

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

-     public class IntegersIterator
      extends IndexIterator

  Class to run over an array of integer datasets and return its items

- - ### Field Summary

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

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntegersIterator(boolean restrict1D, int[] shape, Object... index)` Constructor for an iterator over the items of an array of objects
    `IntegersIterator(int[] shape, Object... index)` Constructor for an iterator over the items of an array of objects

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### IntegersIterator

          public IntegersIterator(int[] shape,
                                  Object... index)

      Constructor for an iterator over the items of an array of objects
      Parameters:
        `shape` - of entire data array
        `index` - an array of integer dataset, boolean dataset, slices or null entries (same as full slices)

    - #### IntegersIterator

          public IntegersIterator(boolean restrict1D,
                                  int[] shape,
                                  Object... index)

      Constructor for an iterator over the items of an array of objects
      Parameters:
        `restrict1D` - if true, allow only one 1D integer datasets otherwise they must match shape
        `shape` - of entire data array
        `index` - an array of integer dataset, boolean dataset, slices or null entries (same as full slices)

  - ### Method Detail

    - #### getShape

          public int[] getShape()

      Overrides:
        `getShape` in class `IndexIterator`
      Returns:
        shape of iterator (can be null, if not known or applicable)

    - #### 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 © 2014–2022 Eclipse Foundation. All rights reserved.