@@ -0,0 +1,1230 @@
+package com.fengdai.android.utils;%0A%0Aimport java.lang.reflect.Array;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class ArrayUtil %7B%0A%0A    /**%0A     * Remove all null element in the given array. Will return null if the array is null.%0A     *%0A     * @return A new array if any element is removed, or the origin array if nothing removed.%0A     */%0A    public static %3CT%3E T%5B%5D removeNull(T... array) %7B%0A        if (array == null) %7B%0A            return null;%0A        %7D%0A        if (!array.getClass().isArray()) %7B%0A            throw new IllegalArgumentException(array.getClass().toString() + %22 is not Array class!%22);%0A        %7D%0A        List%3CT%3E list = new ArrayList%3CT%3E(Arrays.asList(array));%0A        boolean changed = false;%0A        for (T data : array) %7B%0A            if (data == null) %7B%0A                list.remove(data);%0A                changed = true;%0A            %7D%0A        %7D%0A        if (!changed) %7B%0A            return array;%0A        %7D else %7B%0A            T%5B%5D newArray = (T%5B%5D) Array.newInstance(array.getClass()%0A                    .getComponentType(), list.size());%0A            if (list.isEmpty()) %7B%0A                return newArray;%0A            %7D%0A            return list.toArray(newArray);%0A        %7D%0A    %7D%0A%7D%0A

Add ArrayUtil.