de.caff.generics

## Interface PrimitiveShortIterable

- All Superinterfaces:
    java.lang.Iterable<java.lang.Short>
  All Known Subinterfaces:
    MutableShortIndexable, ShortIndexable
  All Known Implementing Classes:
    MutableShortIndexable.Base, ShortIndexable.Base, ShortPair

      public interface PrimitiveShortIterable
      extends java.lang.Iterable<java.lang.Short>

  Iterable which iterates over a primitive short.
  Since:
    December 13, 2021
  Author:
    Rammi
  See Also:
    `for creating one on the fly`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PrimitiveShortIterable` | `EMPTY` Empty iterable of primitive short values.
    `static PrimitiveShortIterator` | `EMPTY_SHORT_ITERATOR` Empty iterator of primitive short values.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default PrimitiveIntIterable` | `asIntIterable()` View this byte iterable as an int iterable.
    `default PrimitiveLongIterable` | `asLongIterable()` View this byte iterable as a long iterable.
    `default PrimitiveIntIterable` | `asUnsignedIntIterable()` View this byte iterable as an int iterable which uses the unsigned byte values of this iterable.
    `default PrimitiveLongIterable` | `asUnsignedLongIterable()` View this byte iterable as a long iterable which uses the unsigned byte values of this iterable.
    `default boolean` | `containsShort(short value)` Does this short iterable contain the given value?
    `default void` | `forEachShort(ShortConsumer action)` Invoke the given action with each short value in this iterable.
    `default <E extends java.lang.Exception> void` | `forEachShortFragile(FragileShortConsumer<E> action)` Invoke the given fragile action with each value in this iterable.
    `default java.util.Iterator<java.lang.Short>` | `iterator()`
    `PrimitiveShortIterator` | `shortIterator()` Get a primitive short iterator.

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

      `forEach, spliterator`

- - ### Field Detail

    - #### EMPTY_SHORT_ITERATOR

          static final PrimitiveShortIterator EMPTY_SHORT_ITERATOR

      Empty iterator of primitive short values.
      See Also:
        `PrimitiveShortIterator.EMPTY`

    - #### EMPTY

          static final PrimitiveShortIterable EMPTY

      Empty iterable of primitive short values.

  - ### Method Detail

    - #### shortIterator

          @NotNull
          PrimitiveShortIterator shortIterator()

      Get a primitive short iterator.
      Returns:
        short iterator

    - #### iterator

          @NotNull
          default java.util.Iterator<java.lang.Short> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<java.lang.Short>`

    - #### forEachShort

          default void forEachShort(@NotNull
                                    ShortConsumer action)

      Invoke the given action with each short value in this iterable.
      Parameters:
        `action` - action to be call for each short value in sequemce.

    - #### forEachShortFragile

          default <E extends java.lang.Exception> void forEachShortFragile(@NotNull
                                                                           FragileShortConsumer<E> action)
                                                                    throws E extends java.lang.Exception

      Invoke the given fragile action with each value in this iterable.
      Type Parameters:
        `E` - checked exception thrown by action
      Parameters:
        `action` - action to be called for each value in sequence
      Throws:
        `E` - if `action` throws it
        `E extends java.lang.Exception`

    - #### containsShort

          default boolean containsShort(short value)

      Does this short iterable contain the given value? This is an operation which takes time linear to the size of this iterable and should only be used rarely.
      Parameters:
        `value` - value to check for
      Returns:
        `true` if the value is contained in this iterable, `false` if not

    - #### asIntIterable

          @NotNull
          default PrimitiveIntIterable asIntIterable()

      View this byte iterable as an int iterable.
      Returns:
        int iterable view of this byte iterable

    - #### asUnsignedIntIterable

          @NotNull
          default PrimitiveIntIterable asUnsignedIntIterable()

      View this byte iterable as an int iterable which uses the unsigned byte values of this iterable.
      Returns:
        unsigned int iterable view of this byte iterable

    - #### asLongIterable

          @NotNull
          default PrimitiveLongIterable asLongIterable()

      View this byte iterable as a long iterable.
      Returns:
        long iterable view of this byte iterable

    - #### asUnsignedLongIterable

          @NotNull
          default PrimitiveLongIterable asUnsignedLongIterable()

      View this byte iterable as a long iterable which uses the unsigned byte values of this iterable.
      Returns:
        unsigned long iterable view of this byte iterable