de.caff.generics.function

## Interface FragileFunction3<R,E extends java.lang.Exception,P1,P2,P3>

- Type Parameters:
    `R` - return type
    `E` - exception type
    `P1` - first parameter type
    `P2` - second parameter type
    `P3` - third parameter type
  All Superinterfaces:
    FragileFunction1<R,E,ITuple3<? extends P1,? extends P2,? extends P3>>
  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 FragileFunction3<R,E extends java.lang.Exception,P1,P2,P3>
      extends FragileFunction1<R,E,ITuple3<? extends P1,? extends P2,? extends P3>>

  Function with three parameters, possibly throwing a checked exception.
  Author:
    Rammi

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default R` | `apply(ITuple3<? extends P1,? extends P2,? extends P3> tuple3)` Expand a tuple into the arguments of this function.
    `R` | `apply(P1 arg1, P2 arg2, P3 arg3)` Run the function.
    `default Function3<R,P1,P2,P3>` | `nonFragile()` Convert this to a non-fragile function which does not throw a checked exception.
    `default Function3<R,P1,P2,P3>` | `nonFragile(R fallback)` Convert this to a non-fragile function which does not throw a checked exception.
    `default Function3<R,P1,P2,P3>` | `nonFragileX(Function4<? extends R,? super E,? super P1,? super P2,? super P3> exceptionHandler)` Convert this to a non-fragile function which does not throw a checked exception.
    `default FragileFunction2<R,E,P2,P3>` | `partial1(P1 argument)` Get a partially applied function.
    `default FragileFunction2<R,E,P1,P3>` | `partial2(P2 argument)` Get a partially applied function.
    `default FragileFunction2<R,E,P1,P2>` | `partial3(P3 argument)` Get a partially applied function.

    - ### Methods inherited from interface de.caff.generics.function.FragileFunction1

      `nonFragileX`

- - ### Method Detail

    - #### apply

          R apply(P1 arg1,
                  P2 arg2,
                  P3 arg3)
           throws E extends java.lang.Exception

      Run the function.
      Parameters:
        `arg1` - first argument
        `arg2` - second argument
        `arg3` - third argument
      Returns:
        return value
      Throws:
        `E` - typed exception
        `E extends java.lang.Exception`

    - #### apply

          default R apply(@NotNull
                          ITuple3<? extends P1,? extends P2,? extends P3> tuple3)
                   throws E extends java.lang.Exception

      Expand a tuple into the arguments of this function.
      Specified by:
        `apply` in interface `FragileFunction1<R,E extends java.lang.Exception,ITuple3<? extends P1,? extends P2,? extends P3>>`
      Parameters:
        `tuple3` - tuple to expand
      Returns:
        the result of calling this function with the arguments from the expanded tuple
      Throws:
        `E` - typed exception
        `E extends java.lang.Exception`

    - #### nonFragile

          @NotNull
          default Function3<R,P1,P2,P3> 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(Object, Object, Object)`.
      Specified by:
        `nonFragile` in interface `FragileFunction1<R,E extends java.lang.Exception,ITuple3<? extends P1,? extends P2,? extends P3>>`
      Returns:
        non-fragile function
      See Also:
        `Function3.nonFragile(FragileFunction3)`

    - #### nonFragile

          @NotNull
          default Function3<R,P1,P2,P3> 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!
      Specified by:
        `nonFragile` in interface `FragileFunction1<R,E extends java.lang.Exception,ITuple3<? extends P1,? extends P2,? extends P3>>`
      Parameters:
        `fallback` - fallback value
      Returns:
        non-fragile function
      See Also:
        `Function3.nonFragile(FragileFunction3, Object)`

    - #### nonFragileX

          @NotNull
          default Function3<R,P1,P2,P3> nonFragileX(@NotNull
                                                             Function4<? extends R,? super E,? super P1,? super P2,? super P3> 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:
        `Function3.nonFragileX(FragileFunction3, Function4)`

    - #### partial1

          @NotNull
          default FragileFunction2<R,E,P2,P3> partial1(P1 argument)

      Get a partially applied function.
      Parameters:
        `argument` - value applied for first argument
      Returns:
        partially evaluated function

    - #### partial2

          @NotNull
          default FragileFunction2<R,E,P1,P3> partial2(P2 argument)

      Get a partially applied function.
      Parameters:
        `argument` - value applied for second argument
      Returns:
        partially evaluated function

    - #### partial3

          @NotNull
          default FragileFunction2<R,E,P1,P2> partial3(P3 argument)

      Get a partially applied function.
      Parameters:
        `argument` - value applied for third argument
      Returns:
        partially evaluated function