Helper method to verify an the object is not null.

@param message Message displayed if the object is null
@param nonNullObject Object to assert
493885
static void assertNotNull(String message, Object nonNullObject)
    {
        if(nonNullObject == null)
        {
            System.err.println(message);
        }
    }
194004
public static <T> T checkNotNull(T argument, String errorMessage) {
        if (argument == null) {
            throw new NullPointerException(errorMessage);
        }
        return argument;
    }
245267
public static <T> T assertNotNull(T object, String fieldName) throws IllegalArgumentException {
        if (object == null) {
            throw new IllegalArgumentException(String.format("%s cannot be null", fieldName));
        }
        return object;
    }
432620
public static <T> T assertNotNull(T value, String message) {
        if (value == null)
            throw new IllegalStateException(message);
        return value;
    }
90917
public static void assertFalse(boolean condition, String message) {
		if (imp != null && condition) {
			imp.assertFailed(message);
		}
	}
1351548
public static void validateNotNull( Object object, String identifier )
        throws PreConditionException
    {
        if( object == null )
        {
            throw new PreConditionException( identifier + " was NULL." );
        }
    }
830313
public static void objectNotNull(Object object1, String name1, Object object2, String name2) {
        if (verify) {
            if (object1 == null || object2 == null) {
                throw new IllegalArgumentException(name1+":"+object1+"  "+name2+":"+object2);
            }
        }
    }
69859
public static void assertNotBlank(final String name, final String value, final String msg) {
        assertTrue(!isBlank(value), name + " cannot be blank" + (msg != null ? ": " + msg : ""));
    }
1210703
@NonNull
    public static <T> T nonNull(@Nullable T obj) {
        if (obj == null) {
           throw new IllegalArgumentException("encountered illegal null value");
        }
        return obj;
    }
495324
@SuppressWarnings("null")
  public static
  @NonNull
  <T> T notNull(
    final @Nullable T x,
    final @NonNull String message)
  {
    if (x == null) {
      final StringBuilder text = new StringBuilder(32 + message.length());
      text.append("Expression evaluated to null: ");
      text.append(message);
      throw new NullCheckException(text.toString());
    }
    return x;
  }
334327
public <T> T notNull(final T object, final String message) {
        if (object == null) {
            failNull(message);
        }
        return object;
    }
570133
public static void notNullOrEmpty(final String string, final String message) throws IllegalArgumentException {
        if (string == null || string.length() == 0) {
            throw new IllegalArgumentException(message);
        }
    }
682140
public static void checkNotNullOrEmpty(String string, String message) {
    if (string == null || string.isEmpty()) {
      throw new IllegalArgumentException(message);
    }
  }
778323
public static void checkNotNull(Object o, String msg, int arg1) {
        if (o == null) {
            throwNullPointerEx(msg, arg1);
        }
    }
586574
public static <T> T assertNotNull(T argument, String msg) {
        if (argument == null) throw new IllegalArgumentException(msg);
        return argument;
    }
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"));
		}
	}
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;
  }