Module io.jooby
Package io.jooby

Interface SneakyThrows.Consumer<V>

Type Parameters:
V - Input type.
All Superinterfaces:
Consumer<V>
Enclosing class:
SneakyThrows
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 SneakyThrows.Consumer<V> extends Consumer<V>
Throwable version of Consumer.

This class rethrow any exception using the SneakyThrows.propagate(Throwable) technique.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(V v)
     
    void
    tryAccept(V value)
    Performs this operation on the given argument.

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Method Details

    • tryAccept

      void tryAccept(V value) throws Exception
      Performs this operation on the given argument.
      Parameters:
      value - Argument.
      Throws:
      Exception - If something goes wrong.
    • accept

      default void accept(V v)
      Specified by:
      accept in interface Consumer<V>