Package com.gengoai.function
Interface CheckedConsumer<T>
-
- Type Parameters:
T
- Functional parameter
- All Superinterfaces:
Serializable
- 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<T> extends Serializable
Version of Consumer that is serializable and checked
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
accept(T t)
Accept.default <R> CheckedFunction<T,R>
asFunction()
As consumer serializable consumer.static <T,R>
CheckedFunction<T,R>asFunction(CheckedConsumer<T> consumer)
static <T,R>
CheckedFunction<T,R>asFunction(CheckedConsumer<T> consumer, R returnValue)
default <R> CheckedFunction<T,R>
asFunction(R returnValue)
As consumer serializable consumer.
-
-
-
Method Detail
-
accept
void accept(T t) throws Throwable
Accept.- Parameters:
t
- the t- Throws:
Throwable
- the throwable
-
asFunction
default <R> CheckedFunction<T,R> asFunction(R returnValue)
As consumer serializable consumer.- Returns:
- the serializable consumer
-
asFunction
default <R> CheckedFunction<T,R> asFunction()
As consumer serializable consumer.- Returns:
- the serializable consumer
-
asFunction
static <T,R> CheckedFunction<T,R> asFunction(CheckedConsumer<T> consumer, R returnValue)
-
asFunction
static <T,R> CheckedFunction<T,R> asFunction(CheckedConsumer<T> consumer)
-
-