Java Assert Not Null assertNotNull(Object object, String message)

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

Description

assert Not Null

License

Apache License

Declaration

public static void assertNotNull(Object object, String message) 

Method Source Code

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

public class Main {
    public static void assertNotNull(Object object, String message) {
        if (object == null)
            error(message);//from  w  w w . jav  a  2 s  .c  o m
    }

    /** @throws IllegalArgumentException exception */
    public static void error(String msg) {
        throw new IllegalArgumentException(msg);
    }
}

Related

  1. assertNotNull(Object obj, String name)
  2. assertNotNull(Object object)
  3. assertNotNull(Object object, RuntimeException cause)
  4. assertNotNull(Object object, String description)
  5. assertNotNull(Object object, String message)
  6. assertNotNull(Object object, String message)
  7. assertNotNull(Object object, String param)
  8. assertNotNull(Object val)
  9. assertNotNull(Object value)