Interface UncheckedFuture<V>
- Type Parameters:
- V- The result type returned by this Future's- get()and- get(long, TimeUnit)methods.
- All Superinterfaces:
- Future<V>
An 
Future that throws unchecked instead checked exceptions.- 
Method SummaryModifier and TypeMethodDescriptionget()Gets perFuture.get()but rethrows checked exceptions as unchecked.Gets perFuture.get(long, TimeUnit)but rethrows checked exceptions as unchecked.static <T> Stream<UncheckedFuture<T>>map(Collection<Future<T>> futures) Maps the given instances as unchecked.static <T> Collection<UncheckedFuture<T>>on(Collection<Future<T>> futures) Maps the given instances as unchecked.static <T> UncheckedFuture<T>Creates a new instance on the given Future.Methods inherited from interface java.util.concurrent.Futurecancel, isCancelled, isDone
- 
Method Details- 
mapMaps the given instances as unchecked.- Type Parameters:
- T- The result type returned by the Futures'- get()and- get(long, TimeUnit)methods.
- Parameters:
- futures- The Futures to uncheck.
- Returns:
- a new stream.
 
- 
onMaps the given instances as unchecked.- Type Parameters:
- T- The result type returned by the Futures'- get()and- get(long, TimeUnit)methods.
- Parameters:
- futures- The Futures to uncheck.
- Returns:
- a new collection.
 
- 
onCreates a new instance on the given Future.- Type Parameters:
- T- The result type returned by this Future's- get()and- get(long, TimeUnit)methods.
- Parameters:
- future- The Future to uncheck.
- Returns:
- a new instance.
 
- 
getGets perFuture.get()but rethrows checked exceptions as unchecked.The default mapping from checked to unchecked is: 
- 
getGets perFuture.get(long, TimeUnit)but rethrows checked exceptions as unchecked.The default mapping from checked to unchecked is: 
 
-