mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-17 23:16:01 +00:00
- added docs for `Promise` and `PromiseFactory` - removed outdated README docs - moved some common utilities to `PromiseUtil` - improved efficiency of result array resizing - added cancellation result to promise executors - changed visibility of `PromiseJoiner` to public, and made some method names more verbose - inlined `DeferredExecutionException` to inside `AbstractPromise` - inlined default promise implementation to inner class in the factory - removed necessity for base factories to provide a logger
20 lines
617 B
Java
20 lines
617 B
Java
package dev.tommyjs.futur.function;
|
|
|
|
/**
|
|
* Represents an operation that accepts a single input argument and returns no result,
|
|
* and may throw an exception. This is a functional interface whose functional method is {@link #accept(Object)}.
|
|
*
|
|
* @param <T> the type of the input to the operation
|
|
*/
|
|
@FunctionalInterface
|
|
public interface ExceptionalConsumer<T> {
|
|
|
|
/**
|
|
* Performs this operation on the given argument, potentially throwing an exception.
|
|
*
|
|
* @param value the input argument
|
|
* @throws Exception if unable to compute a result
|
|
*/
|
|
void accept(T value) throws Exception;
|
|
|
|
} |