org.eclipse.january.dataset

## Class BooleanContiguousIterator

- java.lang.Object
- - org.eclipse.january.dataset.IndexIterator
  - - org.eclipse.january.dataset.BooleanIterator
    - - org.eclipse.january.dataset.BooleanContiguousIterator

-     public class BooleanContiguousIterator
      extends BooleanIterator

  Class to run over a pair of contiguous datasets
  Since:
    2.1

- - ### Field Summary

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

      `aDataset, aMax, aStart, aStep, cDataset, cIndex, maxShape, oDataset, oIndex, oStart, oStep, outputA, value`

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

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BooleanContiguousIterator(boolean v, Dataset a, Dataset c, Dataset o, boolean createIfNull)` Construct a boolean iterator that stops at the position in choice dataset where its value matches the given boolean

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

      `createIterator, createIterator, createIterator, createIterator, getChoice, getOutput, getShape`

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

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

- - ### Constructor Detail

    - #### BooleanContiguousIterator

          public BooleanContiguousIterator(boolean v,
                                           Dataset a,
                                           Dataset c,
                                           Dataset o,
                                           boolean createIfNull)

      Construct a boolean iterator that stops at the position in choice dataset where its value matches the given boolean
      Parameters:
        `v` - boolean value
        `a` - primary dataset
        `c` - choice dataset
        `o` - output dataset, can be null
        `createIfNull` - if true create the output dataset if that is null

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