org.eclipse.january.dataset

## Class SingleItemIterator

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

-     public class SingleItemIterator
      extends IndexIterator

  Class to run over a broadcasted single-item dataset

- - ### Field Summary

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

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingleItemIterator(int offset, int size)` Constructor for an iterator over single item that will be broadcast over given size of broadcast shape

  - ### 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

    - #### SingleItemIterator

          public SingleItemIterator(int offset,
                            int size)

      Constructor for an iterator over single item that will be broadcast over given size of broadcast shape
      Parameters:
        `offset` - offset to single item
        `size` -

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