de.caff.generics.mda

## Interface OneDimensionalAccess<T>

- All Superinterfaces:
    Countable<T>, Indexable<T>, java.lang.Iterable<T>, MultiDimensional, MultiDimensionalAccess<T>, MultiDimensionalReadAccess<T>, MutableIndexable<T>, OneDimensionalReadAccess<T>, Sizeable
  All Known Subinterfaces:
    OneDimensionalBooleanAccess, OneDimensionalByteAccess, OneDimensionalCharAccess, OneDimensionalDoubleAccess, OneDimensionalFloatAccess, OneDimensionalIntAccess, OneDimensionalLongAccess, OneDimensionalShortAccess
  All Known Implementing Classes:
    OneDimensionalArray, OneDimensionalBooleanArray, OneDimensionalByteArray, OneDimensionalCharArray, OneDimensionalDoubleArray, OneDimensionalFloatArray, OneDimensionalIntArray, OneDimensionalLongArray, OneDimensionalShortArray

      public interface OneDimensionalAccess<T>
      extends MutableIndexable<T>, MultiDimensionalAccess<T>, OneDimensionalReadAccess<T>

  A fixed-size one-dimensional array of items.
  Since:
    November 11, 2019
  Author:
    Rammi

- - ### Nested Class Summary

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

      `MutableIndexable.Base<TT>, MutableIndexable.ListView<T>`

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

      `OneDimensionalReadAccess.Base<TT>`

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

      `Indexable.IndexableSpliterator<TElem>`

  - ### Field Summary

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

    - ### Fields inherited from interface de.caff.generics.Indexable

      `EMPTY_INDEXABLE_STRING`

    - ### Fields inherited from interface de.caff.generics.Sizeable

      `NULL`

    - ### 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 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.
    `default OneDimensionalAccess<T>` | `copy()` Get an independent copy.
    `static <E> OneDimensionalAccess<E>` | `empty()` Get an empty 1dimensional access.
    `default void` | `fillByIndex(java.util.function.IntFunction<? extends T> setter)` Set all values by their index.
    `default void` | `setElement(T value, int... indexes)` Set the element located at the given indexes.
    `default void` | `setElementAt(T value, int index)` Set the value at the given index.

    - ### Methods inherited from interface de.caff.generics.MutableIndexable

      `applyOnEach, asList, copy, copyInternally, copyOf, filled, fillFrom, fromArray, fromArray, fromIndexable, fromIndexable, fromIterable, getCopy, getCopy, headSet, init, initByIndex, initFragile, listIterator, nulled, order, reverse, revert, revert, set, setFrom, setFrom, setFromArray, setMulti, shuffle, subSet, swap, swyp, sybSet, syt, tailSet, viewArray, viewArray, viewIndexable, viewList`

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

      `change, setAll, setFrom, setFrom, setFrom`

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

      `asBase, getElement, getNumDimensions, getNumElements, getSize, getSizes, singleton, view, visitAll, visitAll`

    - ### Methods inherited from interface de.caff.generics.Indexable

      `addToArray, addToArray, addToCollection, asCollection, binarySearch, checkIndex, combine, compare, downCast, emptyIndexable, equal, findAll, findAllX, findFirst, findFirst, findFirst, findFirstX, findLast, findLast, findLast, findNext, findNext, findNext, findNextX, findPrevious, findPrevious, findPrevious, first, firstMatch, firstMatch, firstMatchX, forEachEntry, forEachEntryFragile, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, get, getMod, gyt, hash, indexedView, indexes, init, initByIndex, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, mapArray, optional, ordered, rotated, spliterator, toString, view, view, viewAsBooleanIndexable, viewAsByteIndexable, viewAsCharIndexable, viewAsDict, viewAsDoubleIndexable, viewAsFloatIndexable, viewAsIntIndexable, viewAsLongIndexable, viewAsShortIndexable, viewByIndex, viewFragile, viewList, viewList, viewListN, viewListN, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, withAppendedItem, withCachedHash, withExchangedItemAt, withInsertedItemAt, withPrependedItem, withRemovedItemAt, withSwappedItemsAt`

    - ### Methods inherited from interface de.caff.generics.Countable

      `addAllTo, combined, combined, containsEq, containsRef, downCast, equal, equals, filtered, filteredToIndexable, filterToCountable, firstOrNull, foldLeft, forEachFragile, freeze, frozen, frozen, getAny, groupingBy, groupingBy, hasAll, hasAny, isSorted, isStrictlySorted, lastOrNull, mappingBy, mappingBy, optFirst, optLast, orderedCombination, parellelStream, sorted, stream, toArray, toArray, toList, toString, uniform, viewCollection, viewCollection, viewCollectionN, viewCollectionN`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

    - ### Methods inherited from interface de.caff.generics.Sizeable

      `size`

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

      `empty, linearized`

- - ### Field Detail

    - #### EMPTY

          static final OneDimensionalAccess<?> EMPTY

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

  - ### Method Detail

    - #### copy

          @NotNull
          default OneDimensionalAccess<T> copy()

      Get an independent copy.
      Specified by:
        `copy` in interface `OneDimensionalReadAccess<T>`
      Returns:
        independent copy

    - #### setElementAt

          default void setElementAt(T value,
                                    int index)

      Set the value at the given index. This provides the same functionality as `MutableIndexable.set(int, Object)`, but has the same parameter order as the raw sister implementations of this interface.
      Parameters:
        `value` - value to set
        `index` - index where to set the value

    - #### 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()`

    - #### 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
                                   java.util.function.IntFunction<? extends T> setter)

      Set all values by their index. This will call the setter for all indexes and set the value at the given index from the return value of the setter.
      Parameters:
        `setter` - setter which gets the index and returns the value to set for that index

    - #### empty

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

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