de.caff.generics.mda

## Interface TwoDimensionalIntAccess

- All Superinterfaces:
    MultiDimensional, MultiDimensionalAccess<java.lang.Integer>, MultiDimensionalReadAccess<java.lang.Integer>, TwoDimensionalAccess<java.lang.Integer>, TwoDimensionalIntReadAccess, TwoDimensionalReadAccess<java.lang.Integer>
  All Known Implementing Classes:
    SmallTwoDimensionalIntArray, TwoDimensionalIntArray

      public interface TwoDimensionalIntAccess
      extends TwoDimensionalIntReadAccess, TwoDimensionalAccess<java.lang.Integer>

  Read/write access for 2-dimensional rectangular int arrays.
  Since:
    November 11, 2019
  Author:
    Rammi

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface de.caff.generics.mda.TwoDimensionalIntReadAccess

      `TwoDimensionalIntReadAccess.Base`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TwoDimensionalIntAccess` | `EMPTY` Empty 2dimensional int access.

    - ### Fields inherited from interface de.caff.generics.mda.MultiDimensionalReadAccess

      `EMPTY0, EMPTY1, EMPTY2, EMPTY3, EMPTY4, EMPTY5, EMPTY6, EMPTY7`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `changeAllValues(IntOperator1 operator)` Change all values by applying an operator.
    `default void` | `changeValueAt(IntOperator1 operator, int ix, int iy)` Change the value at the given indexes.
    `default void` | `fillValuesByIndex(java.util.function.IntBinaryOperator setter)` Set all values depending on their indexes.
    `default void` | `setElementAt(java.lang.Integer element, int ix, int iy)` Set the element at the given indexes.
    `void` | `setValueAt(int value, int ix, int iy)` Set the value at the given indexes.
    `default OneDimensionalIntAccess` | `subAtX(int ix)` Get a 1-dimensional view of the row at the given X index.
    `default OneDimensionalIntAccess` | `subAtY(int iy)` Get a 1-dimensional view of the column at the given X index.
    `default TwoDimensionalIntAccess` | `transposed()` Get a transposed view of this 2-dimensional read access.

    - ### Methods inherited from interface de.caff.generics.mda.TwoDimensionalIntReadAccess

      `asBase, getElementAt, getValueAt, singleton`

    - ### Methods inherited from interface de.caff.generics.mda.TwoDimensionalAccess

      `changeAll, changeAll, createConstant, createIndexed, createNulled, createSupplied, empty, fillByIndex, setElement, zeroX, zeroY`

    - ### Methods inherited from interface de.caff.generics.mda.TwoDimensionalReadAccess

      `equal, getElement, getNumDimensions, getNumElements, getSize, getSizes, hash, sizeX, sizeY, toString, view, visitAll, visitAll, xIterable, xIterator, yIterable, yIterator`

    - ### Methods inherited from interface de.caff.generics.mda.MultiDimensionalAccess

      `change, setAll, setFrom, setFrom, setFrom`

    - ### Methods inherited from interface de.caff.generics.mda.MultiDimensionalReadAccess

      `empty, linearized`

- - ### Field Detail

    - #### EMPTY

          static final TwoDimensionalIntAccess EMPTY

      Empty 2dimensional int access.

  - ### Method Detail

    - #### setValueAt

          void setValueAt(int value,
                          int ix,
                          int iy)

      Set the value at the given indexes.
      Parameters:
        `value` - value to set
        `ix` - X index
        `iy` - Y index

    - #### changeValueAt

          default void changeValueAt(@NotNull
                                     IntOperator1 operator,
                                     int ix,
                                     int iy)

      Change the value at the given indexes.
      Parameters:
        `operator` - operator to apply to the value
        `ix` - X index
        `iy` - Y index

    - #### changeAllValues

          default void changeAllValues(@NotNull
                                       IntOperator1 operator)

      Change all values by applying an operator.
      Parameters:
        `operator` - operator to apply

    - #### fillValuesByIndex

          default void fillValuesByIndex(@NotNull
                                         java.util.function.IntBinaryOperator setter)

      Set all values depending on their indexes. This will call the setter for all indexes and set the value at the given index from its result.
      Parameters:
        `setter` - setter which provides the value to set for each index combination

    - #### setElementAt

          default void setElementAt(@NotNull
                                    java.lang.Integer element,
                                    int ix,
                                    int iy)

      Description copied from interface: `TwoDimensionalAccess`
      Set the element at the given indexes.
      Specified by:
        `setElementAt` in interface `TwoDimensionalAccess<java.lang.Integer>`
      Parameters:
        `element` - element to set
        `ix` - index in X direction from `0` (included) to `TwoDimensionalReadAccess.sizeX()` (excluded)
        `iy` - index in Y direction from `0` (included) to `TwoDimensionalReadAccess.sizeY()` (excluded)

    - #### subAtX

          @NotNull
          default OneDimensionalIntAccess subAtX(int ix)

      Description copied from interface: `TwoDimensionalReadAccess`
      Get a 1-dimensional view of the row at the given X index. This is a view, so setting elements will change values in this array.
      Specified by:
        `subAtX` in interface `TwoDimensionalAccess<java.lang.Integer>`
      Specified by:
        `subAtX` in interface `TwoDimensionalIntReadAccess`
      Specified by:
        `subAtX` in interface `TwoDimensionalReadAccess<java.lang.Integer>`
      Parameters:
        `ix` - X index
      Returns:
        1-dimensional array at `ix`

    - #### subAtY

          @NotNull
          default OneDimensionalIntAccess subAtY(int iy)

      Description copied from interface: `TwoDimensionalReadAccess`
      Get a 1-dimensional view of the column at the given X index. This is a view, so setting elements will change values in this array.
      Specified by:
        `subAtY` in interface `TwoDimensionalAccess<java.lang.Integer>`
      Specified by:
        `subAtY` in interface `TwoDimensionalIntReadAccess`
      Specified by:
        `subAtY` in interface `TwoDimensionalReadAccess<java.lang.Integer>`
      Parameters:
        `iy` - Y index
      Returns:
        1-dimensional array at `iy`

    - #### transposed

          @NotNull
          default TwoDimensionalIntAccess transposed()

      Description copied from interface: `TwoDimensionalReadAccess`
      Get a transposed view of this 2-dimensional read access.
      Specified by:
        `transposed` in interface `TwoDimensionalAccess<java.lang.Integer>`
      Specified by:
        `transposed` in interface `TwoDimensionalIntReadAccess`
      Specified by:
        `transposed` in interface `TwoDimensionalReadAccess<java.lang.Integer>`
      Returns:
        transposed view where X and Y are interchanged