org.rx.util.function.Action Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
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();
}
}