class SwitchingExecutor {

    private SwitchingExecutor() {
    }

    static SwitchingExecutor of() {
        return new SwitchingExecutor();
    }

    <T> Optional<T> invoke(Supplier<Boolean> switcher, Supplier<T> trueSupplier,
                           Supplier<T> falseSupplier) {<FILL_FUNCTION_BODY>}
}

        Optional<T> option = null;

        if (switcher.get()) {
            option = Optional.of(trueSupplier.get());
        } else {
            option = Optional.of(falseSupplier.get());
        }
        if (option == null) {
            option = Optional.empty();
        }

        return option;
    
<no_super_class>