package fpeas.sideeffect; public class SideEffectUtility { public static SideEffect doNothing() { return new SideEffect() { public void run(final T input) { } }; } public static SideEffect throwRuntimeException() { return new SideEffect() { public void run(final T input) { //noinspection ProhibitedExceptionThrown throw new RuntimeException(); } }; } }