de.caff.generics.function

## Interface FragileFunction0<R,E extends java.lang.Exception>

- Type Parameters:
    `R` - return type
    `E` - exception type
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface FragileFunction0<R,E extends java.lang.Exception>

  Function with no parameter which can throw an exception.
  Author:
    Rammi

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `R` | `apply()` Run the function.
    `default Function0<R>` | `nonFragile()` Convert this to a non-fragile function which does not throw a checked exception.
    `default Function0<R>` | `nonFragile(R fallback)` Convert this to a non-fragile function which does not throw a checked exception.
    `default Function0<R>` | `nonFragileX(java.util.function.Function<? super E,? extends R> exceptionHandler)` Convert this to a non-fragile function which does not throw a checked exception.

- - ### Method Detail

    - #### apply

          R apply()
           throws E extends java.lang.Exception

      Run the function.
      Returns:
        return value
      Throws:
        `E` - typed exception
        `E extends java.lang.Exception`

    - #### nonFragile

          @NotNull
          default Function0<R> nonFragile()

      Convert this to a non-fragile function which does not throw a checked exception. This will instead throw an unchecked `WrappedFragileException` for any checked exception thrown during `apply()`.
      Returns:
        non-fragile function
      See Also:
        `Function0.nonFragile(FragileFunction0)`

    - #### nonFragile

          @NotNull
          default Function0<R> nonFragile(R fallback)

      Convert this to a non-fragile function which does not throw a checked exception. This will instead return the `fallback` value. Please note that in this case the exception is completely lost!
      Parameters:
        `fallback` - fallback value
      Returns:
        non-fragile function
      See Also:
        `Function0.nonFragile(FragileFunction0, Object)`

    - #### nonFragileX

          @NotNull
          default Function0<R> nonFragileX(@NotNull
                                                    java.util.function.Function<? super E,? extends R> exceptionHandler)

      Convert this to a non-fragile function which does not throw a checked exception.
      Parameters:
        `exceptionHandler` - handler which can handle the exception how it sees fit. E.g. throw an unchecked exception (compare `nonFragile()`, return a fallback (compare `nonFragile(Object)`), or do the latter but also log or collect the exception
      Returns:
        non-fragile function
      See Also:
        `Function0.nonFragileX(FragileFunction0, Function)`