@@ -0,0 +1,1834 @@
+package com.cv4j.image.util;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * Created by Tony Shen on 2017/5/21.%0A */%0A%0Apublic class Preconditions %7B%0A%0A    /**%0A     *  %E5%8F%AF%E4%BB%A5%E5%88%A4%E6%96%AD%E4%BB%BB%E4%BD%95%E4%B8%80%E4%B8%AA%E5%AF%B9%E8%B1%A1%E6%98%AF%E5%90%A6%E4%B8%BA%E7%A9%BA,%E5%8C%85%E6%8B%ACList Map String %E5%A4%8D%E6%9D%82%E5%AF%B9%E8%B1%A1%E7%AD%89%E7%AD%89,%0A     *  %E5%8F%AA%E8%83%BD%E5%88%A4%E6%96%AD%E5%AF%B9%E8%B1%A1,%E8%80%8C%E4%B8%8D%E8%83%BD%E5%88%A4%E6%96%AD%E5%9F%BA%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%0A     *  Preconditions.isBlank(%22%22)  true%0A     *  Preconditions.isBlank(%22 %22)  true%0A     *  Preconditions.isBlank(null)  true%0A     *  Preconditions.isBlank(%22null%22)  false%0A     * @param t%0A     * @param %3CT%3E%0A     * @return%0A     */%0A    public static %3CT%3E boolean isBlank(T t) %7B%0A%0A        if (t==null) %7B%0A            return true;%0A        %7D%0A%0A%0A        if (t instanceof List) %7B%0A            if (((List) t).size()==0) %7B%0A                return true;%0A            %7D%0A        %7D else if (t instanceof Map) %7B%0A            if (((Map) t).size()==0) %7B%0A                return true;%0A            %7D%0A        %7D else if (t instanceof Object %5B%5D) %7B%0A            if (((Object%5B%5D) t).length==0) %7B%0A                return true;%0A            %7D%0A        %7D else if (t instanceof String) %7B%0A%0A            String str = (String)t;%0A            if (str.length()==0) return true;%0A%0A            str = str.trim();%0A            if (str.length()==0) return true;%0A        %7D%0A%0A        return false;%0A    %7D%0A%0A    public static %3CT%3E boolean isNotBlank(T t) %7B%0A        return !isBlank(t);%0A    %7D%0A%0A    public static boolean isNotBlanks(Object... objects) %7B%0A%0A        if (objects==null) %7B%0A            return false;%0A        %7D%0A%0A        for (Object obj:objects) %7B%0A            if (isBlank(obj)) %7B%0A                return false;%0A            %7D%0A        %7D%0A%0A        return true;%0A    %7D%0A%0A    public static %3CT%3E T checkNotNull(T arg) %7B%0A        return checkNotNull(arg, %22Argument must not be null%22);%0A    %7D%0A%0A    public static %3CT%3E T checkNotNull(T arg, String message) %7B%0A        if (arg == null) %7B%0A            throw new NullPointerException(message);%0A        %7D%0A        return arg;%0A    %7D%0A%7D%0A

add Preconditions