Java Assert Null assertNonNull(String argumentName, Object argument)

Here you can find the source of assertNonNull(String argumentName, Object argument)

Description

assert Non Null

License

Open Source License

Declaration

static void assertNonNull(String argumentName, Object argument) 

Method Source Code

//package com.java2s;
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

public class Main {
    static void assertNonNull(String argumentName, Object argument) {
        if (argument == null)
            throw new IllegalArgumentException("Argument '" + argumentName + "' is null.");
    }/*  w w w  .  j  a  v a2  s.  c  om*/
}

Related

  1. assertAllAreNull(String messageIfNull, Object... objects)
  2. assertInstance(final Object object, final Class c, final boolean allowNull)
  3. assertIsNull(Object obj)
  4. assertNonNull(final T object, final String paramName)
  5. assertNoNull(Object object, String paramName)
  6. assertNull(final Object obj, final String msg)
  7. assertNull(final Object value, final String name)
  8. assertNull(Object o)