Package aQute.bnd.exceptions
Interface ConsumerWithException<T>
-
- Type Parameters:
T
- the type of the argument
- 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 ConsumerWithException<T>
Consumer interface that allows exceptions.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
accept(T t)
static <T> java.util.function.Consumer<T>
asConsumer(ConsumerWithException<T> unchecked)
static <T> java.util.function.Consumer<T>
asConsumerIgnoreException(ConsumerWithException<T> unchecked)
default java.util.function.Consumer<T>
ignoreException()
default java.util.function.Consumer<T>
orElseThrow()
-
-
-
Method Detail
-
accept
void accept(T t) throws java.lang.Exception
- Throws:
java.lang.Exception
-
orElseThrow
default java.util.function.Consumer<T> orElseThrow()
-
ignoreException
default java.util.function.Consumer<T> ignoreException()
-
asConsumer
static <T> java.util.function.Consumer<T> asConsumer(ConsumerWithException<T> unchecked)
-
asConsumerIgnoreException
static <T> java.util.function.Consumer<T> asConsumerIgnoreException(ConsumerWithException<T> unchecked)
-
-