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

com.landawn.abacus.util.function.Runnable Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package com.landawn.abacus.util.function;

import com.landawn.abacus.util.N;
import com.landawn.abacus.util.Try;

public interface Runnable extends java.lang.Runnable, Try.Runnable {

    @Override
    void run();

    public static Runnable of(final Runnable runnable) {
        N.requireNonNull(runnable);

        return runnable;
    }

    public static  Runnable create(final Callable callable) {
        N.requireNonNull(callable);

        return new Runnable() {
            @Override
            public void run() {
                callable.call();
            }
        };
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy