Interface CheckedConsumer<S,E extends Exception>

Type Parameters:
S - source-type
E - exception that can be thrown during apply
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 CheckedConsumer<S,E extends Exception>
Consumes a value and throws an exception.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(S in)
    Like Consumer.accept(T) but throws an exception.
  • Method Details

    • accept

      void accept(S in) throws E
      Like Consumer.accept(T) but throws an exception.
      Parameters:
      in - the argument passed into the operation.
      Throws:
      E - if the operation does not succeed.