Package com.microej.kf.util
Class RunnableWithResult<R>
- java.lang.Object
-
- com.microej.kf.util.RunnableWithResult<R>
-
- All Implemented Interfaces:
java.lang.Runnable
public abstract class RunnableWithResult<R> extends java.lang.Object implements java.lang.Runnable
-
-
Constructor Summary
Constructors Constructor Description RunnableWithResult()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description RgetResult()Gets the result.voidrun()By default sets the result returned byrunWithResult().protected abstract RrunWithResult()protected voidsetResult(R result)
-
-
-
Method Detail
-
setResult
protected void setResult(R result)
-
getResult
public R getResult()
Gets the result.- Returns:
- the result.
-
run
public final void run()
By default sets the result returned byrunWithResult().- Specified by:
runin interfacejava.lang.Runnable
-
runWithResult
protected abstract R runWithResult()
-
-