Exemple #1
0
 public static <T extends CharSequence> T notBlank(T t, String str) {
   if (t == null) {
     throw new IllegalArgumentException(str + " may not be null");
   } else if (!TextUtils.isBlank(t)) {
     return t;
   } else {
     throw new IllegalArgumentException(str + " may not be blank");
   }
 }
Exemple #2
0
 public static void notBlank(final CharSequence s, final String name) {
   if (TextUtils.isBlank(s)) {
     throw new IllegalStateException(name + " is blank");
   }
 }