public abstract class RunnableWithResult<T>
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
RunnableWithResult() |
Modifier and Type | Method and Description |
---|---|
T |
getResult()
Get the result of the run execution.
|
T |
getResultOrThrow()
Get the result of the run execution.
|
void |
run() |
abstract T |
runWithTry()
Run method to be implemented by the derived class.
|
public final void run()
run
in interface java.lang.Runnable
public T getResult() throws java.lang.RuntimeException
RuntimeException
.java.lang.RuntimeException
- encapsulated exception encountered during runpublic T getResultOrThrow() throws java.lang.Throwable
java.lang.RuntimeException
- encapsulated exception encountered during runjava.lang.Throwable
public abstract T runWithTry() throws java.lang.Throwable
getResult()
.java.lang.Throwable