Modifier and Type | Field and Description |
---|---|
(package private) int |
data |
Constructor and Description |
---|
I(int it) |
Modifier and Type | Method and Description |
---|---|
Thunk<java.lang.Integer> |
asThunk()
Tell if this is really a
Thunk |
java.lang.Integer |
call()
Compute the value if it is needed.
|
boolean |
isShared()
Tell if this is shared.
|
public java.lang.Integer call()
Lazy
Compute the value if it is needed.
public Thunk<java.lang.Integer> asThunk()
Lazy
Tell if this is really a Thunk
public boolean isShared()
Lazy
Tell if this is shared.
Data and functions whose Lazy.call()
method returns this as well
as simple boxes that just hold a value ready to be supplied and Thunk
s
are considered shared.
But a bare lambda expression is assumed to be in need of sharing. For example:
() -> 42