Interface SideEffect
-
public interface SideEffectAn 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 SideEffectNOOPA no-opSideEffect
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SideEffectfromRunnable(java.lang.Runnable runnable)Create aSideEffectfrom a javaRunnable.static SideEffectsideEffect(SideEffect sideEffect)Static factory method to aid in inference.default java.lang.RunnabletoRunnable()Convert thisSideEffectto 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 thisSideEffectto a javaRunnable.- Returns:
- the
Runnable
-
fromRunnable
static SideEffect fromRunnable(java.lang.Runnable runnable)
Create aSideEffectfrom 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
-
-