Java Assert Not Null assertNotNull(T exception, Object... objects)

Here you can find the source of assertNotNull(T exception, Object... objects)

Description

assert Not Null

License

Apache License

Declaration

public static <T extends Exception> void assertNotNull(T exception, Object... objects) throws T 

Method Source Code

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

public class Main {
    public static <T extends Exception> void assertNotNull(T exception, Object... objects) throws T {
        for (Object object : objects) {
            if (object == null) {
                throw exception;
            }//from w  w  w.ja va2s.  c om
        }
    }
}

Related

  1. assertNotNull(String fieldName, Object object)
  2. assertNotNull(String message, Object object)
  3. assertNotNull(String message, Object val)
  4. assertNotNull(String variableName, Object value)
  5. assertNotNull(StringBuilder buffer)
  6. assertNotNull(T o)
  7. assertNotNull(T obj)
  8. assertNotNull(T object, String fieldName)
  9. assertNotNull(T value, String message)