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

com.neko233.toolchain.common.base.ObjectUtils233 Maven / Gradle / Ivy

package com.neko233.toolchain.common.base;

public class ObjectUtils233 {

    public static boolean allNotNull(Object... objects) {
        for (Object o : objects) {
            if (o == null) {
                return false;
            }
        }
        return true;
    }

    public static boolean isAnyNull(Object... objects) {
        return !allNotNull(objects);
    }

    public static  T getOrDefault(T object, T defaultValue) {
        return object == null ? defaultValue : object;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy