Interface CheckedIntConsumer<E 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 interface CheckedIntConsumer<E extends Throwable>
An int consumer that can throw checked exceptions.
Since:
1.14
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(int input)
     
    Returns a new CheckedIntConsumer that also passes the input to that.
  • Method Details

    • accept

      void accept(int input) throws E
      Throws:
      E
    • andThen

      default CheckedIntConsumer<E> andThen(CheckedIntConsumer<E> that)
      Returns a new CheckedIntConsumer that also passes the input to that. For example: out::writeInt.andThen(logger::logInt).accept(123).