de.caff.generics.function

## Interface FragileProcedure4<E extends java.lang.Exception,P1,P2,P3,P4>

- Type Parameters:
    `P1` - first parameter type
    `P2` - second parameter type
    `P3` - third parameter type
    `P4` - fourth parameter type
  All Superinterfaces:
    FragileProcedure1<E,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>
  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 FragileProcedure4<E extends java.lang.Exception,P1,P2,P3,P4>
      extends FragileProcedure1<E,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>

  Function without return and with four parameters.
  Author:
    Rammi
  See Also:
    `Procedure0`, `Procedure1`, `Procedure2`, `Procedure4`, `Procedure5`, `Procedure6`, `Procedure7`, `Procedure8`, `Procedure9`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FragileProcedure4<?,?,?,?,?>` | `NULL` Procedure with three arguments which does nothing.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default <FR extends ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>,FP> FragileProcedure1<E,FP>` | `after1(java.util.function.Function<FP,FR> before)` Get a chained procedure which first applies the given function, then this procedure.
    `default void` | `apply(ITuple4<? extends P1,? extends P2,? extends P3,? extends P4> tuple4)` Run the function.
    `void` | `apply(P1 arg1, P2 arg2, P3 arg3, P4 arg4)` Run the procedure.
    `static <X extends java.lang.Exception,T1,T2,T3,T4> FragileProcedure4<X,T1,T2,T3,T4>` | `empty()` Return a procedure which does nothing.
    `default Procedure4<P1,P2,P3,P4>` | `nonFragile()` Convert this to a non-fragile procedure which does not throw a checked exception.
    `default Procedure4<P1,P2,P3,P4>` | `nonFragileX(Procedure5<? super E,? super P1,? super P2,? super P3,? super P4> exceptionHandler)` Convert this to a non-fragile procedure which does not a checked exception.
    `default FragileProcedure3<E,P2,P3,P4>` | `partial1(P1 argument)` Get a partially applied procedure.
    `default FragileProcedure3<E,P1,P3,P4>` | `partial2(P2 argument)` Get a partially applied procedure.
    `default FragileProcedure3<E,P1,P2,P4>` | `partial3(P3 argument)` Get a partially applied procedure.
    `default FragileProcedure3<E,P1,P2,P3>` | `partial4(P4 argument)` Get a partially applied procedure.

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

      `applyNonNull, nonFragileX, partial`

- - ### Field Detail

    - #### NULL

          @NotNull
          static final FragileProcedure4<?,?,?,?,?> NULL

      Procedure with three arguments which does nothing. Use `empty()` instead.

  - ### Method Detail

    - #### apply

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

      Run the procedure.
      Parameters:
        `arg1` - first procedure argument
        `arg2` - second procedure argument
        `arg3` - third procedure argument
        `arg4` - fourth procedure argument
      Throws:
        `E` - exception
        `E extends java.lang.Exception`

    - #### apply

          default void apply(@NotNull
                             ITuple4<? extends P1,? extends P2,? extends P3,? extends P4> tuple4)
                      throws E extends java.lang.Exception

      Description copied from interface: `FragileProcedure1`
      Run the function.
      Specified by:
        `apply` in interface `FragileProcedure1<E extends java.lang.Exception,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>`
      Parameters:
        `tuple4` - function argument
      Throws:
        `E` - exception
        `E extends java.lang.Exception`

    - #### nonFragile

          @NotNull
          default Procedure4<P1,P2,P3,P4> nonFragile()

      Convert this to a non-fragile procedure which does not throw a checked exception. This will instead throw an unchecked `WrappedFragileException` for any checked exception thrown during `apply(Object, Object, Object, Object)`.
      Specified by:
        `nonFragile` in interface `FragileProcedure1<E extends java.lang.Exception,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>`
      Returns:
        non-fragile function
      See Also:
        `Procedure4.nonFragile(FragileProcedure4)`

    - #### nonFragileX

          @NotNull
          default Procedure4<P1,P2,P3,P4> nonFragileX(@NotNull
                                                               Procedure5<? super E,? super P1,? super P2,? super P3,? super P4> exceptionHandler)

      Convert this to a non-fragile procedure which does not a checked exception. This will instead throw an unchecked `WrappedFragileException` for any checked exception thrown during `apply(Object, Object, Object, Object)`.
      Parameters:
        `exceptionHandler` - handler called when an exception is encountered. It may either ignore it, throw an unchecked exception, or collect the exceptions
      Returns:
        non-fragile function
      See Also:
        `Procedure4.nonFragileX(FragileProcedure4, Procedure5)`

    - #### after1

          @NotNull
          default <FR extends ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>,FP> FragileProcedure1<E,FP> after1(@NotNull
                                                                                                                                       java.util.function.Function<FP,FR> before)

      Get a chained procedure which first applies the given function, then this procedure. The given function has to return a `ITuple3` with matching parametric types which are applied in their order to this procedure.
      Type Parameters:
        `FR` - function `before`'s return type, has to be a 3-tuple with matching types
        `FP` - function `before`'s parameter type, same for returned procedure
      Parameters:
        `before` - function to apply first, has to return a non-`null` result so unpacking the parameters from the tuple is possible
      Returns:
        chain of function and this procedure

    - #### partial1

          @NotNull
          default FragileProcedure3<E,P2,P3,P4> partial1(P1 argument)

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

    - #### partial2

          @NotNull
          default FragileProcedure3<E,P1,P3,P4> partial2(P2 argument)

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

    - #### partial3

          @NotNull
          default FragileProcedure3<E,P1,P2,P4> partial3(P3 argument)

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

    - #### partial4

          @NotNull
          default FragileProcedure3<E,P1,P2,P3> partial4(P4 argument)

      Get a partially applied procedure.
      Parameters:
        `argument` - value applied for fourth argument
      Returns:
        partially evaluated procedure

    - #### empty

          @NotNull
          static <X extends java.lang.Exception,T1,T2,T3,T4> FragileProcedure4<X,T1,T2,T3,T4> empty()

      Return a procedure which does nothing. This just returns `NULL`, but the compiler will accept it smoothly.
      Specified by:
        `empty` in interface `FragileProcedure1<E extends java.lang.Exception,ITuple4<? extends P1,? extends P2,? extends P3,? extends P4>>`
      Type Parameters:
        `X` - exception type
        `T1` - first argument type
        `T2` - second argument type
        `T3` - third argument type
        `T4` - fourth argument type
      Returns:
        do-nothing procedure