com.landawn.abacus.util.function.Callable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of abacus-util-all-jdk7 Show documentation
Show all versions of abacus-util-all-jdk7 Show documentation
A general programming library in Java
package com.landawn.abacus.util.function;
import com.landawn.abacus.util.N;
import com.landawn.abacus.util.Try;
public interface Callable extends java.util.concurrent.Callable, Try.Callable {
@Override
R call();
public static Callable of(final Callable callable) {
N.requireNonNull(callable);
return callable;
}
public static Callable create(Runnable cmd) {
N.requireNonNull(cmd);
return new Callable() {
@Override
public Void call() {
cmd.run();
return null;
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy