Java Assert Not Null assertNotNull(final Object o, final String message)

Here you can find the source of assertNotNull(final Object o, final String message)

Description

assert Not Null

License

Open Source License

Declaration

static void assertNotNull(final Object o, final String message) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static void assertNotNull(final Object o, final String message) {
        if (o == null)
            throw new NullPointerException(message);
    }/*from  w w w  . j  a va 2s  .c  om*/
}

Related

  1. assertArgumentNotNull(T argument, String argumentName)
  2. assertElementNotNull(Object element, Class elementClass)
  3. assertFieldNotNull(Object fieldValue, String fieldName)
  4. assertFormatResultNotNull(Object r)
  5. assertInstanceOfNotNull(Object obj, Class expClass)
  6. assertNotNull(final Object obj, final String msg)
  7. assertNotNull(final Object obj, final String reference)
  8. assertNotNull(final Object object, final String message)
  9. assertNotNull(final Object object, final String message)