package me.dslztx.assist.util;

/**
 * @author dslztx
 */
public class ArrayAssist {

    public static boolean isEmpty(Object[] array) {
        if (array == null || array.length == 0) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(Object[] array) {
        if (array != null && array.length != 0) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(byte[] array) {
        if (array == null || array.length == 0) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(byte[] array) {
        if (array != null && array.length != 0)
            return true;
        return false;
    }

    public static boolean isEmpty(int[] array) {
        if (array == null || array.length == 0) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(int[] array) {
        if (array != null && array.length != 0)
            return true;
        return false;
    }
}

@@ -25,16 +25,93 @@
 .util;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A
 /**%0A * @
@@ -1125,11 +1125,756 @@
 e;%0A    %7D
+%0A%0A    /**%0A     * %E6%8A%A5%E9%94%99%EF%BC%9AList%3CInteger%3E list = Arrays.asList(new int%5B%5D%7B423, 523%7D); %3Cbr/%3E%0A     * %E5%8E%9F%E5%9B%A0%E5%88%86%E6%9E%90%EF%BC%9A%E5%B0%86%E6%95%B4%E4%B8%AAint%5B%5D%E4%BD%9C%E4%B8%BA%E4%B8%80%E4%B8%AAObject%3Cbr/%3E%0A     * %E4%B8%8D%E6%8A%A5%E9%94%99%EF%BC%9AList%3CInteger%3E list = Arrays.asList(new Integer%5B%5D%7B423, 523%7D);%0A     */%0A    public static List%3CInteger%3E toList(int%5B%5D array) %7B%0A        List%3CInteger%3E result = new ArrayList%3CInteger%3E();%0A        if (isEmpty(array)) %7B%0A            return result;%0A        %7D%0A%0A        for (int element : array) %7B%0A            result.add(element);%0A        %7D%0A%0A        return result;%0A    %7D%0A%0A    public static List%3CInteger%3E toList(Integer%5B%5D array) %7B%0A        List%3CInteger%3E result = new ArrayList%3CInteger%3E();%0A        if (isEmpty(array)) %7B%0A            return result;%0A        %7D%0A%0A        result.addAll(Arrays.asList(array));%0A%0A        return result;%0A    %7D
 %0A%7D%0A

add two toList method