de.caff.generics

## Interface PrimitiveFloatIterable

- All Superinterfaces:
    java.lang.Iterable<java.lang.Float>
  All Known Subinterfaces:
    FloatIndexable, MutableFloatIndexable
  All Known Implementing Classes:
    FloatIndexable.Base, FloatPair, MutableFloatIndexable.Base

      public interface PrimitiveFloatIterable
      extends java.lang.Iterable<java.lang.Float>

  Iterable which iterates over a primitive float.
  Since:
    December 13, 2021
  Author:
    Rammi

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PrimitiveFloatIterable` | `EMPTY` Empty iterable of primitive float values.
    `static PrimitiveFloatIterator` | `EMPTY_FLOAT_ITERATOR` Empty iterator of primitive float values.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default PrimitiveDoubleIterable` | `asDoubleIterable()` View this float iterable as a double iterable.
    `default boolean` | `containsFloat(float value)` Does this float iterable contain the given value?
    `default boolean` | `containsFloat(float value, float eps)` Does this float iterable contain the given value?
    `PrimitiveFloatIterator` | `floatIterator()` Get a primitive float iterator.
    `default void` | `forEachFloat(FloatConsumer action)` Invoke the given action with each float value in this iterable.
    `default <E extends java.lang.Exception> void` | `forEachFloatFragile(FragileFloatConsumer<E> action)` Invoke the given fragile action with each value in this iterable.
    `default java.util.Iterator<java.lang.Float>` | `iterator()`

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

      `forEach, spliterator`

- - ### Field Detail

    - #### EMPTY_FLOAT_ITERATOR

          static final PrimitiveFloatIterator EMPTY_FLOAT_ITERATOR

      Empty iterator of primitive float values.
      See Also:
        `PrimitiveFloatIterator.EMPTY`

    - #### EMPTY

          static final PrimitiveFloatIterable EMPTY

      Empty iterable of primitive float values.

  - ### Method Detail

    - #### floatIterator

          @NotNull
          PrimitiveFloatIterator floatIterator()

      Get a primitive float iterator.
      Returns:
        float iterator

    - #### iterator

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

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

    - #### forEachFloat

          default void forEachFloat(@NotNull
                                    FloatConsumer action)

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

    - #### forEachFloatFragile

          default <E extends java.lang.Exception> void forEachFloatFragile(@NotNull
                                                                           FragileFloatConsumer<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`

    - #### containsFloat

          default boolean containsFloat(float value)

      Does this float iterable contain the given value? This is an operation which is 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

    - #### containsFloat

          default boolean containsFloat(float value,
                                        float eps)

      Does this float iterable contain the given value? Compared to `containsFloat(float)` this allows for a small deviation.
      Parameters:
        `value` - value to check for
        `eps` - epsilon defining the possible deviation from `value` which is still accepted, using `0.0f` will behave like `containsFloat(float)`
      Returns:
        `true` if this iterable contains the value within the given epsilon, `false` if not

    - #### asDoubleIterable

          @NotNull
          default PrimitiveDoubleIterable asDoubleIterable()

      View this float iterable as a double iterable.
      Returns:
        double iterable view of this iterable