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

emujava.util.concurrent.CompletableFutureUtils Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package emujava.util.concurrent;

public class CompletableFutureUtils {
    /**
     * Ensures that an object reference passed as a parameter to the calling method is not null.
     */
    public static  T checkNotNull(T reference) {
        try {
            checkCriticalNotNull(reference);
        }
        catch(Exception e) {
            throw new AssertionError(e);
        }
        return reference;
    }

    public static  T checkCriticalNotNull(T reference) {
        if(reference == null) {
            throw new NullPointerException();
        }
        return reference;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy