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 SideEffect
fromRunnable
(Runnable runnable) Create aSideEffect
from a javaRunnable
.static SideEffect
sideEffect
(SideEffect sideEffect) Static factory method to aid in inference.default Runnable
Convert thisSideEffect
to a javaRunnable
.void
Ω()
-
Field Details
-
NOOP
A no-opSideEffect
-
-
Method Details
-
Ω
- Throws:
Throwable
-
toRunnable
Convert thisSideEffect
to a javaRunnable
.- Returns:
- the
Runnable
-
fromRunnable
Create aSideEffect
from a javaRunnable
.- Parameters:
runnable
- theRunnable
- Returns:
- the
SideEffect
-
sideEffect
Static factory method to aid in inference.- Parameters:
sideEffect
- theSideEffect
- Returns:
- the
SideEffect
-