de.caff.generics.mda

## Class ThreeDimensionalArray<T>

- java.lang.Object
- - de.caff.generics.mda.ThreeDimensionalArray<T>

- All Implemented Interfaces:
    MultiDimensional, MultiDimensionalAccess<T>, MultiDimensionalReadAccess<T>, ThreeDimensionalAccess<T>, ThreeDimensionalReadAccess<T>

      public class ThreeDimensionalArray<T>
      extends java.lang.Object
      implements ThreeDimensionalAccess<T>

  A 4-dimensional array.
  Since:
    November 11, 2019
  Author:
    Rammi

- - ### Field Summary

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

      `EMPTY`

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

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreeDimensionalArray(int sx, int sy, int sz)` Constructor.
    `ThreeDimensionalArray(ThreeDimensionalAccess<T> source)` Copy constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getElementAt(int ix, int iy, int iz)` Get the element at the given indexes.
    `void` | `setElementAt(T element, int ix, int iy, int iz)` Set the element at the given indexes.
    `int` | `sizeX()` Get the number of elements in X direction.
    `int` | `sizeY()` Get the number of elements in Y direction
    `int` | `sizeZ()` Get the number of elements in Z direction

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

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

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

      `changeAll, changeAll, empty, fillByIndex, setElement, subAtX, subAtY, subAtZ`

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

      `getElement, getNumDimensions, getNumElements, getSize, getSizes, singleton, 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`

- - ### Constructor Detail

    - #### ThreeDimensionalArray

          public ThreeDimensionalArray(int sx,
                                       int sy,
                                       int sz)

      Constructor.
      Parameters:
        `sx` - size in X direction (at least `1`)
        `sy` - size in Y direction (at least `1`)
        `sz` - size in Z direction (at least `1`)

    - #### ThreeDimensionalArray

          public ThreeDimensionalArray(@NotNull
                                       ThreeDimensionalAccess<T> source)

      Copy constructor.
      Parameters:
        `source` - source access

  - ### Method Detail

    - #### setElementAt

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

      Description copied from interface: `ThreeDimensionalAccess`
      Set the element at the given indexes.
      Specified by:
        `setElementAt` in interface `ThreeDimensionalAccess<T>`
      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)

    - #### sizeX

          public int sizeX()

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get the number of elements in X direction.
      Specified by:
        `sizeX` in interface `ThreeDimensionalReadAccess<T>`
      Returns:
        number of elements in X direction

    - #### sizeY

          public int sizeY()

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get the number of elements in Y direction
      Specified by:
        `sizeY` in interface `ThreeDimensionalReadAccess<T>`
      Returns:
        number of elements in Y direction

    - #### sizeZ

          public int sizeZ()

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get the number of elements in Z direction
      Specified by:
        `sizeZ` in interface `ThreeDimensionalReadAccess<T>`
      Returns:
        number of elements in Z direction

    - #### getElementAt

          public T getElementAt(int ix,
                                int iy,
                                int iz)

      Description copied from interface: `ThreeDimensionalReadAccess`
      Get the element at the given indexes.
      Specified by:
        `getElementAt` in interface `ThreeDimensionalReadAccess<T>`
      Parameters:
        `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 Z direction from `0` (included) to `ThreeDimensionalReadAccess.sizeZ()` (excluded)
      Returns:
        element at the given indexes