DATATYPE - The callable result type.@Immutable public class AdapterThrowingRunnableToCallable<DATATYPE> extends Object implements IThrowingCallable<DATATYPE>
IThrowingRunnable into an
IThrowingCallable.| Constructor and Description |
|---|
AdapterThrowingRunnableToCallable(IThrowingRunnable aRunnable) |
AdapterThrowingRunnableToCallable(IThrowingRunnable aRunnable,
DATATYPE aResult) |
| Modifier and Type | Method and Description |
|---|---|
DATATYPE |
call() |
static AdapterThrowingRunnableToCallable<Object> |
createAdapter(IThrowingRunnable aRunnable)
Create a callable that always returns
null. |
static <DATATYPE> AdapterThrowingRunnableToCallable<DATATYPE> |
createAdapter(IThrowingRunnable aRunnable,
DATATYPE aResult)
Create a callable that always returns the passed value.
|
String |
toString() |
public AdapterThrowingRunnableToCallable(@Nonnull IThrowingRunnable aRunnable)
public AdapterThrowingRunnableToCallable(@Nonnull IThrowingRunnable aRunnable, @Nullable DATATYPE aResult)
@Nonnull public static AdapterThrowingRunnableToCallable<Object> createAdapter(@Nonnull IThrowingRunnable aRunnable)
null.aRunnable - The runnable to be executed.AdapterThrowingRunnableToCallable object.@Nonnull public static <DATATYPE> AdapterThrowingRunnableToCallable<DATATYPE> createAdapter(@Nonnull IThrowingRunnable aRunnable, @Nullable DATATYPE aResult)
aRunnable - The runnable to be executed.aResult - The expected result from calling Callable.call() .
May be null.AdapterThrowingRunnableToCallable object.Copyright © 2006–2014 phloc systems. All rights reserved.