Performs emptiness and nullness check.
@see #checkNotEmpty(Object, String, Object...)
496624
public static <T> T checkNotEmpty(T reference) {
        checkNotNull(reference, "Expected not null object, got '%s'", reference);
        checkNotEmpty(reference, "Expected not empty object, got '%s'", reference);
        return reference;
    }
682140
public static void checkNotNullOrEmpty(String string, String message) {
    if (string == null || string.isEmpty()) {
      throw new IllegalArgumentException(message);
    }
  }
1303898
public <T extends CharSequence> T notEmpty(final T chars, final String message) {
        if (chars == null) {
            failNull(message);
        }
        if (chars.length() == 0) {
            fail(message);
        }
        return chars;
    }
294986
public static boolean areNotEmpty(String... values) {
		boolean result = true;
		if (values == null || values.length == 0) {
			result = false;
		} else {
			for (String value : values) {
				result &= !isEmpty(value);
			}
		}
		return result;
	}
834093
public final void mEMPTY() throws RecognitionException {
		try {
			int _type = EMPTY;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:23:7: ( 'empty' )
			// hql.g:23:9: 'empty'
			{
			match("empty"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
377199
public static void ensureNotEmpty(String string, String errorMessage) {
		
		ensureNotNull(string, errorMessage);
		ensure(string.trim().length() > 0, errorMessage);
	}
710211
public static Buffer ensureNotEmpty(final Buffer reference, final String msg) throws IllegalArgumentException {
        if (reference == null || reference.isEmpty()) {
            throw new IllegalArgumentException(msg);
        }
        return reference;
    }
885047
protected String nullIfEmpty(String str) {
        return (str == null || str.trim().length() == 0) ? null : str;
    }
49921
public static String emptyToNull(String str) {
        return (str != null && !str.isEmpty()) ? str : null;
    }
1010948
public static <O extends Object> void notEmpty(Iterable<O> coll)  {
		if(!validation) return;
		notNull(coll);
		if(!coll.iterator().hasNext())
			throw new ParameterException(ErrorCode.EMPTY);
	}
567496
public void setArrayIfNotEmpty(@NotNull final String key, @Nullable final List<String> value) {
        if (null != value && !value.isEmpty()) {
            setString(key, new Gson().toJson(value));
        }
    }
11084
protected boolean isEmpty(Object o) {
		if (o == null) {
			return true;
		} else if (o instanceof String) {
			return !StringUtils.hasText((String) o);
		} else {
			return false;
		}
	}
694185
public static String notEmpty(String value, String name) {
        return notEmpty(value, name, null);
    }
969632
@SuppressWarnings("rawtypes")
	public static boolean isEmpty(Object obj) {
		if(null == obj) {
			return true;
		}
		
		if(obj instanceof CharSequence) {
			return StrUtil.isEmpty((CharSequence)obj);
		}else if(obj instanceof Map) {
			return MapUtil.isEmpty((Map)obj);
		}else if(obj instanceof Iterable) {
			return IterUtil.isEmpty((Iterable)obj);
		}else if(obj instanceof Iterator) {
			return IterUtil.isEmpty((Iterator)obj);
		}else if(ArrayUtil.isArray(obj)) {
			return ArrayUtil.isEmpty(obj);
		}
		
		return false;
	}
1111865
public static String nullIfEmpty(String value) {
		return value==null || value.isEmpty() ? null : value;
	}
1177551
public static <T extends Collection<?>> T checkNotEmpty(final String name,
                                                            final T parameter) {
        if (parameter == null || parameter.size() == 0) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be filled!");
        }
        return parameter;
    }
1206966
@Nonnull
  public static String ensureNonNullAndNonEmpty(@Nullable final String value, @Nonnull @Constraint("notEmpty(X)") final String dflt) {
    String result = value;
    if (result == null || result.isEmpty()) {
      assertFalse("Default value must not be empty", assertNotNull("Default value must not be null", dflt).isEmpty());
      result = dflt;
    }
    return result;
  }