@@ -0,0 +1,956 @@
+package com.fengdai.android.utils;%0A%0Aimport android.text.TextUtils;%0A%0Aimport java.util.Collection;%0A%0Apublic class Preconditions %7B%0A    public static %3CT extends CharSequence%3E T nonBlank(T text, String name) %7B%0A        if (TextUtils.isEmpty(text)) %7B%0A            throw new IllegalArgumentException(name + %22 must not be blank%22);%0A        %7D else %7B%0A            return text;%0A        %7D%0A    %7D%0A%0A    public static %3CT extends Collection%3E T nonEmpty(T collection, String name) %7B%0A        if (nonNull(collection, name).isEmpty()) %7B%0A            throw new IllegalArgumentException(name + %22 must not be empty%22);%0A        %7D else %7B%0A            return collection;%0A        %7D%0A    %7D%0A%0A    public static %3CT%3E T nonNull(T reference, String name) %7B%0A        if (reference == null) %7B%0A            throw new NullPointerException(name + %22 must not be null%22);%0A        %7D else %7B%0A            return reference;%0A        %7D%0A    %7D%0A%0A    private Preconditions() %7B%0A        throw new AssertionError();%0A    %7D%0A%7D%0A

Add Preconditions