Modifier and Type | Field and Description |
---|---|
(package private) char |
data |
Constructor and Description |
---|
C(char it) |
Modifier and Type | Method and Description |
---|---|
Thunk<java.lang.Character> |
asThunk()
Tell if this is really a
Thunk |
java.lang.Character |
call()
Compute the value if it is needed.
|
boolean |
isShared()
Tell if this is shared.
|
public java.lang.Character call()
Lazy
Compute the value if it is needed.
public Thunk<java.lang.Character> 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