public abstract class Thunk<T>
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
Thunk.ThunkException
A unchecked excpetions that thunks can use to communicate with the outside world. 
 | 
| Constructor and Description | 
|---|
Thunk()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected abstract T | 
compute()  | 
static <T> Thunk<T> | 
directReference(T object)  | 
T | 
get()  | 
T | 
getIfSet()  | 
protected T | 
getValue()  | 
protected void | 
resetState()
Reset the state of the thunk to initialized 
 | 
protected void | 
setValue(T value)  | 
static <T> Thunk<T> | 
synchronizedThunk(Thunk<T> thunk)  | 
public T get()
public T getIfSet()
protected abstract T compute()
protected T getValue()
protected void setValue(T value)
protected void resetState()
public static <T> Thunk<T> synchronizedThunk(Thunk<T> thunk)
thunk - The thunk that should be wrapedpublic static <T> Thunk<T> directReference(T object)
object - The object this thunk shoud produce