All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rx.util.function.Action Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.util.function;

import lombok.SneakyThrows;

@FunctionalInterface
public interface Action extends Runnable {
    void invoke() throws Throwable;

    default  Func toFunc() {
        return () -> {
            invoke();
            return null;
        };
    }

    @SneakyThrows
    @Override
    default void run() {
        invoke();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy