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:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SideEffectfromRunnable(Runnable runnable) Create aSideEffectfrom a javaRunnable.static SideEffectsideEffect(SideEffect sideEffect) Static factory method to aid in inference.default RunnableConvert thisSideEffectto a javaRunnable.voidΩ()
-
Field Details
-
NOOP
A no-opSideEffect
-
-
Method Details
-
Ω
- Throws:
Throwable
-
toRunnable
Convert thisSideEffectto a javaRunnable.- Returns:
- the
Runnable
-
fromRunnable
Create aSideEffectfrom a javaRunnable.- Parameters:
runnable- theRunnable- Returns:
- the
SideEffect
-
sideEffect
Static factory method to aid in inference.- Parameters:
sideEffect- theSideEffect- Returns:
- the
SideEffect
-