org.eclipse.january.dataset

## Class ContiguousIterator

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

-     public class ContiguousIterator
      extends IndexIterator

  Class to run over contiguous datasets

- - ### Field Summary

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

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContiguousIterator(int length)` Constructor for an iterator over the items of a contiguous dataset that are within the dimensions
    `ContiguousIterator(int length, int isize)` Constructor for an iterator over the items of a contiguous dataset that are within the dimensions
    `ContiguousIterator(int length, int isize, int element)` Constructor for an iterator over the items of a contiguous dataset that are within the dimensions

  - ### Method Summary

    All Methods Instance Methods Concrete 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

    - #### ContiguousIterator

          public ContiguousIterator(int length)

      Constructor for an iterator over the items of a contiguous dataset that are within the dimensions
      Parameters:
        `length` - of entire data array

    - #### ContiguousIterator

          public ContiguousIterator(int length,
                                    int isize)

      Constructor for an iterator over the items of a contiguous dataset that are within the dimensions
      Parameters:
        `length` - of entire data array
        `isize` - number of elements in an item

    - #### ContiguousIterator

          public ContiguousIterator(int length,
                                    int isize,
                                    int element)

      Constructor for an iterator over the items of a contiguous dataset that are within the dimensions
      Parameters:
        `length` - of entire data array
        `isize` - number of elements in an item
        `element` - element to start with (for compound datasets)

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