org.eclipse.ease.tools

## Class RunnableWithResult<T>

- java.lang.Object
- - org.eclipse.ease.tools.RunnableWithResult<T>

All Implemented Interfaces:
  Runnable

    public abstract class RunnableWithResult<T>
    extends Object
    implements Runnable

### Constructor Summary

Constructors
Constructor and Description
`RunnableWithResult()`

### Method Summary

All Methods Instance Methods Concrete Methods
`T` `getResult()` Get the result of the run execution.
`T` `getResultFromTry()` Get the result of the run execution.
`void` `run()`
`void` `runWithTry()` Run method to be implemented by the derived class.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RunnableWithResult

    public RunnableWithResult()

### Method Detail

#### getResult

    public T getResult()

Get the result of the run execution. Does not consider eventually thrown exceptions.

Returns:
  runnable result

#### run

    public void run()

Specified by:
  `run` in interface `Runnable`

#### getResultFromTry

    public T getResultFromTry()
                       throws Throwable

Get the result of the run execution. Does rethrow exceptions that occurred during the run.

Returns:
  runnable result
Throws:
  `Throwable` - exceptions encountered during run

#### runWithTry

    public void runWithTry()
                    throws Throwable

Run method to be implemented by the derived class. Exceptions thrown will automatically get caught an rethrown on a `getResult()`.

Throws:
  `Throwable`