Java Assert Not Null assertNotNull(Object obj, String name)

Here you can find the source of assertNotNull(Object obj, String name)

Description

assert Not Null

License

Apache License

Declaration

private static void assertNotNull(Object obj, String name) 

Method Source Code

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

public class Main {
    private static void assertNotNull(Object obj, String name) {
        if (obj == null) {
            throw new IllegalArgumentException("Null " + name + " arguments are not accepted!");
        }/*from   w ww  . j  a  v  a 2  s. com*/
    }
}

Related

  1. assertNotNull(Object obj)
  2. assertNotNull(Object obj)
  3. assertNotNull(Object obj, RuntimeException ex)
  4. assertNotNull(Object obj, String msgTemplate, Object... params)
  5. assertNotNull(Object obj, String name)
  6. assertNotNull(Object object)
  7. assertNotNull(Object object, RuntimeException cause)
  8. assertNotNull(Object object, String description)
  9. assertNotNull(Object object, String message)