public abstract static class MoreFutures.ExceptionOrResult<T>
extends java.lang.Object
This is used, for example, in aggregating the results of many future values in MoreFutures.allAsList(Collection)
.
Modifier and Type | Class and Description |
---|---|
static class |
MoreFutures.ExceptionOrResult.IsException
Describes whether the result was an exception.
|
Constructor and Description |
---|
ExceptionOrResult() |
Modifier and Type | Method and Description |
---|---|
static <T> MoreFutures.ExceptionOrResult<T> |
exception(java.lang.Throwable throwable) |
abstract @Nullable java.lang.Throwable |
getException() |
abstract T |
getResult() |
abstract MoreFutures.ExceptionOrResult.IsException |
isException() |
static <T> MoreFutures.ExceptionOrResult<T> |
result(T result) |
public abstract MoreFutures.ExceptionOrResult.IsException isException()
public abstract T getResult()
public abstract @Nullable java.lang.Throwable getException()
public static <T> MoreFutures.ExceptionOrResult<T> exception(java.lang.Throwable throwable)
public static <T> MoreFutures.ExceptionOrResult<T> result(T result)