Interface IOBiFunction<T,​U,​R>

  • Type Parameters:
    T - the type of the first argument to the function
    U - the type of the second argument to the function
    R - the type of the result of the function
    All Known Subinterfaces:
    IOBinaryOperator<T>
    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 IOBiFunction<T,​U,​R>
    Represents a function that accepts two arguments and produces a result. This is the two-arity specialization of IOFunction.

    This interface is similar to BiFunction except that it is allowed to throw an IOException.

    Author:
    Magno N A Cruz
    See Also:
    IOFunction
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default <V> IOBiFunction<T,​U,​V> andThen​(IOFunction<? super R,​? extends V> after)
      This method is the same as BiFunction.andThen(java.util.function.Function), but with a support for IOException.
      R apply​(T t, U u)
      This method is the same as BiFunction.apply(Object, Object), but with a support for IOException.
    • Method Detail

      • apply

        R apply​(T t,
                U u)
         throws java.io.IOException

        This method is the same as BiFunction.apply(Object, Object), but with a support for IOException.

        Parameters:
        t - The first function.
        u - The second function.
        Returns:
        The function result.
        Throws:
        java.io.IOException - if there is an I/O error performing the operation
      • andThen

        default <V> IOBiFunction<T,​U,​V> andThen​(@Nonnull
                                                            IOFunction<? super R,​? extends V> after)
                                                     throws java.io.IOException

        This method is the same as BiFunction.andThen(java.util.function.Function), but with a support for IOException.

        Type Parameters:
        V - The type of output of the after function, and of the composed function.
        Parameters:
        after - The function to be applied after this function.
        Returns:
        A composed function that applies this function first and then the after function.
        Throws:
        java.io.IOException - if there is an I/O error performing the operation