Java Assert Not Null assertObjectNotNull(Object o, String name)

Here you can find the source of assertObjectNotNull(Object o, String name)

Description

assert Object Not Null

License

Open Source License

Declaration

public static void assertObjectNotNull(Object o, String name) throws NullPointerException 

Method Source Code

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

public class Main {
    public static void assertObjectNotNull(Object o, String name) throws NullPointerException {
        if (o == null) {
            throw new NullPointerException(name);
        }// w  w  w.  j  a v  a  2s . c  o  m
    }
}

Related

  1. assertNotNullArgument(Object obj, String argName)
  2. assertNotNullEightBytes(byte[] bytes)
  3. assertNotNullNotEmpty(String obj, String paramName)
  4. assertNotNullOrThrowException(final Object... objects)
  5. assertObjectNotNull(final Object object)
  6. assertObjectNotNull(String variableName, Object value)
  7. assertObjectNotNull(String variableName, Object value)
  8. assertParameterNotNull(Object parameterValue, String errorMessage)
  9. assertParamNotNull(Object check, String paramName)