de.caff.generics.mda

## Interface OneDimensionalShortReadAccess

- All Superinterfaces:
    Countable<java.lang.Short>, Indexable<java.lang.Short>, java.lang.Iterable<java.lang.Short>, MultiDimensional, MultiDimensionalReadAccess<java.lang.Short>, OneDimensionalReadAccess<java.lang.Short>, Sizeable
  All Known Subinterfaces:
    OneDimensionalShortAccess
  All Known Implementing Classes:
    OneDimensionalShortArray, OneDimensionalShortReadAccess.Base

      public interface OneDimensionalShortReadAccess
      extends OneDimensionalReadAccess<java.lang.Short>

  Read access for 1-dimensional short arrays.
  Since:
    November 11, 2019
  Author:
    Rammi

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `OneDimensionalShortReadAccess.Base` Abstract base class implementing this interface which provides useful implementations for `Object.equals(Object)`, `Object.hashCode()`, `Object.toString()`.

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

      `Indexable.IndexableSpliterator<TElem>, Indexable.ListView<T>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OneDimensionalShortReadAccess` | `EMPTY` Empty 1dimensional short read 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 Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default OneDimensionalShortReadAccess.Base` | `asBase()` Make this read access usable as a base class with default Object methods implemented.
    `default java.lang.Short` | `get(int index)` Get the element at the given index.
    `short` | `getValueAt(int index)` Get the value at the given index.
    `static OneDimensionalShortReadAccess` | `singleton(short singleElement)` Create an 1dimensional short read access with only 1 element.

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

      `copy, empty, getElement, getNumDimensions, getNumElements, getSize, getSizes, view, visitAll, visitAll`

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

      `addToArray, addToArray, addToCollection, asCollection, asList, 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, fromArray, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, getMod, gyt, hash, headSet, indexedView, indexes, init, initByIndex, initFragile, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, listIterator, mapArray, optional, ordered, reverse, rotated, spliterator, subSet, sybSet, tailSet, toString, view, view, viewArray, viewArray, 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 OneDimensionalShortReadAccess EMPTY

      Empty 1dimensional short read access.

  - ### Method Detail

    - #### getValueAt

          short getValueAt(int index)

      Get the value at the given index.

      This is usually more efficient then `get(int)` and `OneDimensionalReadAccess.getElement(int...)`.

      Parameters:
        `index` - index of requested value
      Returns:
        value at the given index

    - #### get

          @NotNull
          default java.lang.Short get(int index)

      Description copied from interface: `Indexable`
      Get the element at the given index.
      Specified by:
        `get` in interface `Indexable<java.lang.Short>`
      Parameters:
        `index` - index between `0` and `size() - 1`
      Returns:
        element at the given index

    - #### singleton

          @NotNull
          static OneDimensionalShortReadAccess singleton(short singleElement)

      Create an 1dimensional short read access with only 1 element.
      Specified by:
        `singleton` in interface `Countable<java.lang.Short>`
      Specified by:
        `singleton` in interface `Indexable<java.lang.Short>`
      Specified by:
        `singleton` in interface `OneDimensionalReadAccess<java.lang.Short>`
      Parameters:
        `singleElement` - the single element
      Returns:
        1dimensional read access with the given single element

    - #### asBase

          @NotNull
          default OneDimensionalShortReadAccess.Base asBase()

      Make this read access usable as a base class with default Object methods implemented.
      Specified by:
        `asBase` in interface `Countable<java.lang.Short>`
      Specified by:
        `asBase` in interface `Indexable<java.lang.Short>`
      Specified by:
        `asBase` in interface `OneDimensionalReadAccess<java.lang.Short>`
      Returns:
        base version of this access