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

group.rxcloud.capa.addons.serialzer.value.ArrayValues Maven / Gradle / Ivy

package group.rxcloud.capa.addons.serialzer.value;

import java.util.Arrays;
import java.util.List;

public final class ArrayValues {

    public static final ArrayValues DEFAULT = new ArrayValues();

    private ArrayValues() {

    }

    public static  boolean isNullOrEmpty(T[] array) {
        return array == null || array.length == 0;
    }

    public static  void checkNullOrEmpty(T[] value, String valueName) {
        if (isNullOrEmpty(value))
            throw new IllegalArgumentException("argument " + valueName + " is null or empty");
    }

    public static  List asList(T[] array) {
        if (array == null)
            return null;

        return Arrays.asList(array);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy