Java Assert Not Null assertNotNull(Object argumentThatMustNotBeNull, String argumentName)

Here you can find the source of assertNotNull(Object argumentThatMustNotBeNull, String argumentName)

Description

assert Not Null

License

Apache License

Declaration

private static void assertNotNull(Object argumentThatMustNotBeNull, String argumentName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    private static void assertNotNull(Object argumentThatMustNotBeNull, String argumentName) {
        if (argumentThatMustNotBeNull == null) {
            throw new IllegalArgumentException(argumentName + " must not be null.");
        }/*  w ww .ja  v  a2s  .co  m*/
    }
}

Related

  1. assertNotNull(final String message, final Object object)
  2. assertNotNull(final String name, final T object)
  3. assertNotNull(final String param, final Object value)
  4. assertNotNull(final T object, final String message)
  5. assertNotNull(final T value, final String param)
  6. assertNotNull(Object expression)
  7. assertNotNull(Object o)
  8. assertNotNull(Object obj)
  9. assertNotNull(Object obj)