Package io.github.connellite.function
Interface UncheckedConsumer<T>
- All Superinterfaces:
Consumer<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Consumer that may throw; checked exceptions are rethrown via ReflectionUtil.propagate(Throwable).-
Method Summary
Modifier and TypeMethodDescriptiondefault voidDelegates touncheckedAccept(T); checked exceptions are propagated.static <T> UncheckedConsumer<T>of(UncheckedConsumer<T> consumer) Gives a throwing method reference this interface as its target type.voiduncheckedAccept(T input) Same asaccept(T), but may throw.
-
Method Details
-
accept
Delegates touncheckedAccept(T); checked exceptions are propagated. -
uncheckedAccept
Same asaccept(T), but may throw.- Throws:
Throwable
-
of
Gives a throwing method reference this interface as its target type. The same instance is returned;accept(T)still propagates checked exceptions.
-