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)
    • Method Detail

      • Ω

        void Ω()
        throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • toRunnable

        default java.lang.Runnable toRunnable()
        Convert this SideEffect to a java Runnable.
        Returns:
        the Runnable
      • fromRunnable

        static SideEffect fromRunnable​(java.lang.Runnable runnable)
        Create a SideEffect from a java Runnable.
        Parameters:
        runnable - the Runnable
        Returns:
        the SideEffect