Interface SideEffect
-
public interface SideEffect
An interface used to represent an effect that requires no input and produces no output, and therefore is only perceivable through inspection of some unreported state. Only exists because Java target-type inference requires an interface, or else this would all be internal, hence the inconveniently-namedΩ
.Ω
should *never* be called directly.- See Also:
IO.io(SideEffect)
-
-
Field Summary
Fields Modifier and Type Field Description static SideEffect
NOOP
A no-opSideEffect
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SideEffect
fromRunnable(java.lang.Runnable runnable)
Create aSideEffect
from a javaRunnable
.static SideEffect
sideEffect(SideEffect sideEffect)
Static factory method to aid in inference.default java.lang.Runnable
toRunnable()
Convert thisSideEffect
to a javaRunnable
.void
Ω()
-
-
-
Field Detail
-
NOOP
static final SideEffect NOOP
A no-opSideEffect
-
-
Method Detail
-
Ω
void Ω() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
toRunnable
default java.lang.Runnable toRunnable()
Convert thisSideEffect
to a javaRunnable
.- Returns:
- the
Runnable
-
fromRunnable
static SideEffect fromRunnable(java.lang.Runnable runnable)
Create aSideEffect
from a javaRunnable
.- Parameters:
runnable
- theRunnable
- Returns:
- the
SideEffect
-
sideEffect
static SideEffect sideEffect(SideEffect sideEffect)
Static factory method to aid in inference.- Parameters:
sideEffect
- theSideEffect
- Returns:
- the
SideEffect
-
-