de.caff.generics.mda

## Interface ThreeDimensionalAccess<T>

- All Superinterfaces:
    MultiDimensional, MultiDimensionalAccess<T>, MultiDimensionalReadAccess<T>, ThreeDimensionalReadAccess<T>
  All Known Subinterfaces:
    ThreeDimensionalBooleanAccess, ThreeDimensionalByteAccess, ThreeDimensionalCharAccess, ThreeDimensionalDoubleAccess, ThreeDimensionalFloatAccess, ThreeDimensionalIntAccess, ThreeDimensionalLongAccess, ThreeDimensionalShortAccess
  All Known Implementing Classes:
    ThreeDimensionalArray, ThreeDimensionalBooleanArray, ThreeDimensionalByteArray, ThreeDimensionalCharArray, ThreeDimensionalDoubleArray, ThreeDimensionalFloatArray, ThreeDimensionalIntArray, ThreeDimensionalLongArray, ThreeDimensionalShortArray

      public interface ThreeDimensionalAccess<T>
      extends ThreeDimensionalReadAccess<T>, MultiDimensionalAccess<T>

  A 3-dimensional rectangular array of items.
  Since:
    November 11, 2019
  Author:
    Rammi

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ThreeDimensionalAccess<?>` | `EMPTY` Empty 3dimensional access.

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

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `changeAll(java.util.function.BiFunction<? super T,int[],? extends T> operator)` Change all elements in this multi-dimensional array.
    `default void` | `changeAll(java.util.function.Function<? super T,? extends T> operator)` Change all elements in this multi-dimensional array.
    `static <E> ThreeDimensionalReadAccess<E>` | `empty()` Get an empty 3dimensional access.
    `default void` | `fillByIndex(IntFunction3<? extends T> setter)` Set all values depending on their indexes.
    `default void` | `setElement(T value, int... indexes)` Set the element located at the given indexes.
    `void` | `setElementAt(T element, int ix, int iy, int iz)` Set the element at the given indexes.
    `default TwoDimensionalAccess<T>` | `subAtX(int fixX)` Get a 2-dimensional view of the plane at the given X index.
    `default TwoDimensionalReadAccess<T>` | `subAtY(int fixY)` Get a 2-dimensional view of the plane at the given Y index.
    `default TwoDimensionalReadAccess<T>` | `subAtZ(int fixZ)` Get a 2-dimensional view of the plane at the given Z index.

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

      `getElement, getElementAt, getNumDimensions, getNumElements, getSize, getSizes, singleton, sizeX, sizeY, sizeZ, view, visitAll, visitAll`

    - ### 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 ThreeDimensionalAccess<?> EMPTY

      Empty 3dimensional access. Use `empty()` instead.

  - ### Method Detail

    - #### setElementAt

          void setElementAt(T element,
                            int ix,
                            int iy,
                            int iz)

      Set the element at the given indexes.
      Parameters:
        `element` - element to set
        `ix` - index in X direction from `0` (included) to `ThreeDimensionalReadAccess.sizeX()` (excluded)
        `iy` - index in Y direction from `0` (included) to `ThreeDimensionalReadAccess.sizeY()` (excluded)
        `iz` - index in Y direction from `0` (included) to `ThreeDimensionalReadAccess.sizeZ()` (excluded)

    - #### setElement

          default void setElement(T value,
                                  int... indexes)

      Description copied from interface: `MultiDimensionalAccess`
      Set the element located at the given indexes.
      Specified by:
        `setElement` in interface `MultiDimensionalAccess<T>`
      Parameters:
        `value` - value to set at the location defined by the given indexes
        `indexes` - `MultiDimensional.getNumDimensions()` indexes inside the bounds defined by `MultiDimensional.getSizes()`

    - #### subAtX

          @NotNull
          default TwoDimensionalAccess<T> subAtX(int fixX)

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get a 2-dimensional view of the plane at the given X index. This is a view, so setting elements will change values in this array.
      Specified by:
        `subAtX` in interface `ThreeDimensionalReadAccess<T>`
      Parameters:
        `fixX` - fix X index
      Returns:
        2-dimensional array at `fixX`

    - #### subAtY

          @NotNull
          default TwoDimensionalReadAccess<T> subAtY(int fixY)

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get a 2-dimensional view of the plane at the given Y index. This is a view, so setting elements will change values in this array.
      Specified by:
        `subAtY` in interface `ThreeDimensionalReadAccess<T>`
      Parameters:
        `fixY` - fix Y index
      Returns:
        2-dimensional array at `fixY`

    - #### subAtZ

          @NotNull
          default TwoDimensionalReadAccess<T> subAtZ(int fixZ)

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get a 2-dimensional view of the plane at the given Z index. This is a view, so setting elements will change values in this array.
      Specified by:
        `subAtZ` in interface `ThreeDimensionalReadAccess<T>`
      Parameters:
        `fixZ` - fix Z index
      Returns:
        2-dimensional array at `fixZ`

    - #### changeAll

          default void changeAll(@NotNull
                                 java.util.function.BiFunction<? super T,int[],? extends T> operator)

      Description copied from interface: `MultiDimensionalAccess`
      Change all elements in this multi-dimensional array. This will run over all elements and call the operator on each.
      Specified by:
        `changeAll` in interface `MultiDimensionalAccess<T>`
      Parameters:
        `operator` - operator to change the value, with the current value as first argument and the indexes as second, returns the new value

    - #### changeAll

          default void changeAll(@NotNull
                                 java.util.function.Function<? super T,? extends T> operator)

      Description copied from interface: `MultiDimensionalAccess`
      Change all elements in this multi-dimensional array. This will run over all elements and call the operator on each.
      Specified by:
        `changeAll` in interface `MultiDimensionalAccess<T>`
      Parameters:
        `operator` - operator to change the value, with the current value as argument

    - #### fillByIndex

          default void fillByIndex(@NotNull
                                   IntFunction3<? extends T> setter)

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

    - #### empty

          @NotNull
          static <E> ThreeDimensionalReadAccess<E> empty()

      Get an empty 3dimensional access.
      Specified by:
        `empty` in interface `ThreeDimensionalReadAccess<T>`
      Type Parameters:
        `E` - element type
      Returns:
        `EMPTY` in a form the compiler accepts