Interface Checked.BiConsumer<T,​U,​E extends Throwable>

  • Type Parameters:
    T - Type of the first argument to the operation.
    U - Type of the second argument to the operation.
    E - Exception type that can be thrown by the body.
    All Superinterfaces:
    Checked<BiConsumer<T,​U>,​E>
    Enclosing interface:
    Checked<WT,​EX extends Throwable>
    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 static interface Checked.BiConsumer<T,​U,​E extends Throwable>
    extends Checked<BiConsumer<T,​U>,​E>
    Like BiConsumer but with a body that can throw checked exceptions.
    • Method Detail

      • accept

        void accept​(T t,
                    U u)
             throws E extends Throwable
        Performs this operation on the given arguments.
        Throws:
        E extends Throwable
      • ederWrap

        default BiConsumer<T,​U> ederWrap()
        Description copied from interface: Checked
        Wraps this Checked functional interfaces as its corresponding Java functional interface WT, which possibly does not allow checked exceptions.

        Checked exceptions of type EX may still, in reality, be thrown. This method is not intended to be called directly; it is used transparently by in(...), which passes the wrapper type into code that requires it, but re-exposes the original checked exception type to the compiler.

        Specified by:
        ederWrap in interface Checked<T,​U>
      • use

        static <T,​U,​E extends ThrowableChecked.BiConsumer<T,​U,​E> use​(Checked.BiConsumer<T,​U,​E> o)
        Shapes a lambda or method reference into an instance of this functional interface.

        This is simply an identity function that can take the place of a more unwieldy cast.

        Type Parameters:
        E - Least upper bound of exception types o can throw.
        Parameters:
        o - The implementing lambda or method reference.