Interface ThrowableQuadFunction<T,U,V,W,R,X extends Throwable>

Type Parameters:
T - The type of the first argument
U - The type of the second argument
V - The type of the third argument
W - The type of the fourth argument
R - The return type
X - The exception that can be thrown
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 ThrowableQuadFunction<T,U,V,W,R,X extends Throwable>
Functional interface that takes four arguments and returns a value.
The FunctionalInterface method is apply(Object, Object, Object, Object).
The class is equivalent to QuadFunction, but the functional method can throw a checked exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <S> @NotNull ThrowableQuadFunction<T,U,V,W,S,X>
    andThen(@NotNull ThrowableFunction<? super R,? extends S,X> after)
    Returns a composed function that first applies this function to its input,
    and then applies the after function to the result.
    apply(T t, U u, V v, W w)
    Applies the arguments to the function and returns the result.
    static <T, U, V, W, R>
    @NotNull QuadFunction<T,U,V,W,R>
    caught(@NotNull ThrowableQuadFunction<T,U,V,W,R,? extends Throwable> function)
    Converts a throwable quad-function into a quad-function that throws a runtime exception when an exception is thrown.
  • Method Details

    • caught

      @NotNull static <T, U, V, W, R> @NotNull QuadFunction<T,U,V,W,R> caught(@NotNull @NotNull ThrowableQuadFunction<T,U,V,W,R,? extends Throwable> function)
      Converts a throwable quad-function into a quad-function that throws a runtime exception when an exception is thrown.
      Type Parameters:
      T - The first argument type
      U - The second argument type
      V - The third argument type
      W - The fourth argument type
      R - The return type
      Parameters:
      function - The throwable quad-function
      Returns:
      A caught quad-function
      Throws:
      NullPointerException - If the throwable quad-function is null
    • apply

      R apply(T t, U u, V v, W w) throws X
      Applies the arguments to the function and returns the result.
      Parameters:
      t - The first argument
      u - The second argument
      v - The third argument
      w - The fourth argument
      Returns:
      The result
      Throws:
      X - The exception that can be thrown
    • andThen

      @NotNull default <S> @NotNull ThrowableQuadFunction<T,U,V,W,S,X> andThen(@NotNull @NotNull ThrowableFunction<? super R,? extends S,X> after)
      Returns a composed function that first applies this function to its input,
      and then applies the after function to the result.
      Type Parameters:
      S - The type of the output of the after function, and of the composed function
      Parameters:
      after - The function to apply after this function is applied
      Returns:
      The composed throwable function
      Throws:
      NullPointerException - If the after function is null