UncheckedFuture¶
- public interface org.apache.commons.lang3.concurrent.UncheckedFuture<V> extends Future<V>[source]¶
An
Futurethat throws unchecked instead checked exceptions.- Type parameters:
<V> – The result type returned by this Future's
get()andget(long, TimeUnit)methods.- Since:
3.13.0
- See also:
Methods¶
|
Gets per |
|
|
Gets per |
|
|
Maps the given instances as unchecked. |
|
|
Maps the given instances as unchecked. |
|
|
Creates a new instance on the given Future. |
- V get()[source]¶
Gets per
Future.get()but rethrows checked exceptions as unchecked.The default mapping from checked to unchecked is:
- V get(long timeout, TimeUnit unit)[source]¶
Gets per
Future.get(long, TimeUnit)but rethrows checked exceptions as unchecked.The default mapping from checked to unchecked is:
- static <T> Stream<UncheckedFuture<T>> map(Collection<Future<T>> futures)[source]¶
Maps the given instances as unchecked.
- Type parameters:
<T> – The result type returned by the Futures'
get()andget(long, TimeUnit)methods.- Parameters:
futures – The Futures to uncheck.
- Returns:
A new stream.
- static <T> Collection<UncheckedFuture<T>> on(Collection<Future<T>> futures)[source]¶
Maps the given instances as unchecked.
- Type parameters:
<T> – The result type returned by the Futures'
get()andget(long, TimeUnit)methods.- Parameters:
futures – The Futures to uncheck.
- Returns:
A new collection.
- static <T> UncheckedFuture<T> on(Future<T> future)[source]¶
Creates a new instance on the given Future.
- Type parameters:
<T> – The result type returned by this Future's
get()andget(long, TimeUnit)methods.- Parameters:
future – The Future to uncheck.
- Returns:
A new instance.