de.caff.generics.mda

## Class TwoDimensionalIntArray

- java.lang.Object
- - de.caff.generics.mda.TwoDimensionalReadAccess.Base<java.lang.Integer>
  - - de.caff.generics.mda.TwoDimensionalIntReadAccess.Base
    - - de.caff.generics.mda.TwoDimensionalIntArray

- All Implemented Interfaces:
    MultiDimensional, MultiDimensionalAccess<java.lang.Integer>, MultiDimensionalReadAccess<java.lang.Integer>, TwoDimensionalAccess<java.lang.Integer>, TwoDimensionalIntAccess, TwoDimensionalIntReadAccess, TwoDimensionalReadAccess<java.lang.Integer>

      public class TwoDimensionalIntArray
      extends TwoDimensionalIntReadAccess.Base
      implements TwoDimensionalIntAccess

  A two-dimensional array of int values.
  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 inherited from interface de.caff.generics.mda.TwoDimensionalIntAccess

      `EMPTY`

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

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TwoDimensionalIntArray(int ySize, int... values)` Constructor.
    `TwoDimensionalIntArray(int xSize, int ySize)` Constructor.
    `TwoDimensionalIntArray(int xSize, int ySize, java.util.function.IntBinaryOperator filler)` Initializing constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getValueAt(int ix, int iy)` Get the value at the given indexes.
    `void` | `setValueAt(int value, int ix, int iy)` Set the value at the given indexes.
    `int` | `sizeX()` Get the number of elements in X direction.
    `int` | `sizeY()` Get the number of elements in Y direction

    - ### Methods inherited from class de.caff.generics.mda.TwoDimensionalIntReadAccess.Base

      `asBase`

    - ### Methods inherited from class de.caff.generics.mda.TwoDimensionalReadAccess.Base

      `equals, hashCode, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

      `changeAllValues, changeValueAt, fillValuesByIndex, setElementAt, subAtX, subAtY, transposed`

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

      `asBase, getElementAt, 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, 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`

- - ### Constructor Detail

    - #### TwoDimensionalIntArray

          public TwoDimensionalIntArray(int xSize,
                                        int ySize)

      Constructor. This fills all elements with `0` values.
      Parameters:
        `xSize` - X size of array
        `ySize` - Y size of array
      See Also:
        `TwoDimensionalIntArray(int, int, IntBinaryOperator)`

    - #### TwoDimensionalIntArray

          public TwoDimensionalIntArray(int xSize,
                                        int ySize,
                                        @NotNull
                                        java.util.function.IntBinaryOperator filler)

      Initializing constructor.
      Parameters:
        `xSize` - X size of array
        `ySize` - Y size of array
        `filler` - setter function which provides the value to set for each index combination
      See Also:
        `TwoDimensionalIntAccess.fillValuesByIndex(java.util.function.IntBinaryOperator)`

    - #### TwoDimensionalIntArray

          public TwoDimensionalIntArray(int ySize,
                                        int... values)

      Constructor.
      Parameters:
        `ySize` - size in y direction
        `values` - values in order, the first `ySize` values will become row 0, the second `ySize` values row 1, and so on. Needs a multiple of ySize values.

  - ### Method Detail

    - #### setValueAt

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

      Set the value at the given indexes.
      Specified by:
        `setValueAt` in interface `TwoDimensionalIntAccess`
      Parameters:
        `value` - value to set
        `ix` - X index
        `iy` - Y index

    - #### getValueAt

          public int getValueAt(int ix,
                                int iy)

      Get the value at the given indexes.
      Specified by:
        `getValueAt` in interface `TwoDimensionalIntReadAccess`
      Parameters:
        `ix` - X index
        `iy` - Y index
      Returns:
        value at given index

    - #### sizeX

          public int sizeX()

      Description copied from interface: `TwoDimensionalReadAccess`
      Get the number of elements in X direction.
      Specified by:
        `sizeX` in interface `TwoDimensionalReadAccess<java.lang.Integer>`
      Returns:
        number of elements in X direction

    - #### sizeY

          public int sizeY()

      Description copied from interface: `TwoDimensionalReadAccess`
      Get the number of elements in Y direction
      Specified by:
        `sizeY` in interface `TwoDimensionalReadAccess<java.lang.Integer>`
      Returns:
        number of elements in Y direction