mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
documentation and small changes
- 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
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
package dev.tommyjs.futur.function;
|
||||
|
||||
/**
|
||||
* Represents a supplier of results that may throw an exception.
|
||||
* This is a functional interface whose functional method is {@link #get()}.
|
||||
*
|
||||
* @param <T> the type of results supplied by this supplier
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ExceptionalSupplier<T> {
|
||||
|
||||
/**
|
||||
* Gets a result, potentially throwing an exception.
|
||||
*
|
||||
* @return a result
|
||||
* @throws Exception if unable to supply a result
|
||||
*/
|
||||
T get() throws Exception;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user