Checks that the given argument is neither null nor empty.
If it is, throws {@link NullPointerException} or {@link IllegalArgumentException}.
Otherwise, returns the argument.
482115
public static <T extends Collection<?>> T checkNonEmpty(T collection, String name) {
        checkNotNull(collection, name);
        checkPositive(collection.size(), name + ".size");
        return collection;
    }
391473
protected final void checkNotNull(final ConversionStringency stringency,
                                      final Logger logger) {
        if (stringency == null) {
            throw new NullPointerException("stringency must not be null");
        }
        if (logger == null) {
            throw new NullPointerException("logger must not be null");
        }
    }
524671
public static void assertNotNull(final Object object, final String message) {
    if (object == null) {
      throw new NullPointerException(message == null ? "Object is null" : message);
    }
  }
1130393
public static void checkArgument(boolean b, String errorMessageTemplate, double p) {
        if (!b) {
            throw new IllegalArgumentException(format(errorMessageTemplate, p));
        }
    }
401320
void assertNotNull(Object object, String param) {
    if (object == null) {
      throw new IllegalArgumentException(String.format(
          "%s may not be null.", param));
    }
  }
1045192
public static <K /*>>> extends @NonNull Object*/, V /*>>> extends @NonNull Object*/>
      void checkMapElementNotNull(Map<K, V> map, @javax.annotation.Nullable Object errorMessage) {
    for (Map.Entry<K, V> entry : map.entrySet()) {
      if (entry.getKey() == null || entry.getValue() == null) {
        throw new NullPointerException(String.valueOf(errorMessage));
      }
    }
  }
1055835
public static boolean isEmptyAny(String... args) {
        for (String arg : args) {
            if (isEmpty(arg)) {
                return true;
            }
        }
        return false;
    }
713933
public static void checkArgumentNotNull(Object reference, String argumentName) {
        if (reference == null) {
            throw ValidatorLogger.LOG.argumentNull(argumentName);
        }
    }
1188527
@NonNull
  public static <K, V> Map<K, V> assertNotNullOrEmpty(Map<K, V> data, @Nullable String name) {
    if (isNullOrEmpty(data)) {
      throw new NullPointerException(name + " cannot be null or empty");
    }
    return data;
  }
800976
public static final Function<Integer,Boolean> isNotNull() {
        return (Function<Integer,Boolean>)((Function)FnObject.isNotNull());
    }
1162343
@SuppressFBWarnings(justification = "Accepting that this is a bad practice - used a Boolean as we needed three states",
            value = {"NP_BOOLEAN_RETURN_NULL"})
    public Boolean getBooleanArgument(String argument) {
        if (line != null && line.hasOption(argument)) {
            final String value = line.getOptionValue(argument);
            if (value != null) {
                return Boolean.parseBoolean(value);
            }
        }
        return null;
    }
90963
public static <T> T assertNotNull(T object, ExceptionType exceptionType, String message, Object... args) {
        if (object == null) {
            if (exceptionType == null) {
                exceptionType = ExceptionType.ILLEGAL_ARGUMENT;
            }

            throw exceptionType.newInstance(getMessage(message, args,
                                                       "[Assertion failed] - the argument is required; it must not be null"));
        }

        return object;
    }
261536
public static <T> T checkNotNull(T obj, String name) {
    if (obj == null) {
      String msg = String.format("parameter '%s' cannot be null", name);
      throw new NullPointerException(msg);
    }
    return obj;
  }
880730
protected void assertArgumentNotNull(String argumentName, Object value) {
        if (argumentName == null) {
            String msg = "The argument name should not be null: argName=null value=" + value;
            throw new IllegalArgumentException(msg);
        }
        if (value == null) {
            String msg = "The value should not be null: argName=" + argumentName;
            throw new IllegalArgumentException(msg);
        }
    }
123106
@SuppressWarnings("nls")
	private void checkNotNull(Object sourceClass, Object eventSetName, Object alistenerType, Object listenerMethodName)
	{
		if (sourceClass == null)
		{
			throw new NullPointerException(Messages.getString("beans.0C"));
		}
		if (eventSetName == null)
		{
			throw new NullPointerException(Messages.getString("beans.53"));
		}
		if (alistenerType == null)
		{
			throw new NullPointerException(Messages.getString("beans.54"));
		}
		if (listenerMethodName == null)
		{
			throw new NullPointerException(Messages.getString("beans.52"));
		}
	}
233259
@NonNull
  public static String assertNotNullOrEmpty(String text, @Nullable String name) {
    if (isNullOrEmpty(text)) {
      throw new NullPointerException(name + " cannot be null or empty");
    }
    return text;
  }
370481
public static <E> void notNullOrEmpty(final E[] argument, final String name) {
    if (argument == null) {
      s_logger.error("Argument {} was null", name);
      throw new QuandlRuntimeException("Value " + name + " was null");
    } else if (argument.length == 0) {
      s_logger.error("Argument {} was empty array", name);
      throw new QuandlRuntimeException("Value " + name + " was empty array");
    }
  }