Java Assert Not Null assertNotNull(Object obj, RuntimeException ex)

Here you can find the source of assertNotNull(Object obj, RuntimeException ex)

Description

assert Not Null

License

Apache License

Declaration

public static void assertNotNull(Object obj, RuntimeException ex) 

Method Source Code

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

public class Main {
    public static void assertNotNull(Object obj, RuntimeException ex) {
        if (obj == null) {
            throw ex;
        }/*from   w  w  w  .ja  va  2 s .  c  o  m*/
    }
}

Related

  1. assertNotNull(Object argumentThatMustNotBeNull, String argumentName)
  2. assertNotNull(Object expression)
  3. assertNotNull(Object o)
  4. assertNotNull(Object obj)
  5. assertNotNull(Object obj)
  6. assertNotNull(Object obj, String msgTemplate, Object... params)
  7. assertNotNull(Object obj, String name)
  8. assertNotNull(Object obj, String name)
  9. assertNotNull(Object object)