T
- the type of the resultpublic static class Blaster.Result<T> extends Object
Modifier and Type | Method and Description |
---|---|
T |
checkedGet()
Gets the result value.
|
boolean |
failed()
Returns true if the method invocation failed (e.g.
|
T |
get()
Gets the result value.
|
Throwable |
getFailure()
Gets the throwable that caused the method invocation to fail.
|
boolean |
success()
Returns true if the method invocation was successful (e.g.
|
public T get()
RuntimeException
.Error
- if the method invocation threw an Error
RuntimeException
- if the method invocation threw an exceptionpublic T checkedGet() throws ExecutionException
get()
except that it wraps the failures
in the checked exception type ExecutionException
(just like Future
s do).ExecutionException
- if the method invocation threw an exceptionpublic Throwable getFailure()
null
.null
public boolean success()
public boolean failed()