Java Assert Not Null assertArgNotNull(T obj, String name)

Here you can find the source of assertArgNotNull(T obj, String name)

Description

assert Arg Not Null

License

Open Source License

Declaration

private static <T> void assertArgNotNull(T obj, String name) 

Method Source Code

//package com.java2s;

public class Main {
    private static <T> void assertArgNotNull(T obj, String name) {
        if (obj == null) {
            throw new IllegalArgumentException("argument " + name == null ? "" : name + " is null");
        }/*from  w w  w.j  a v a2 s.  c  om*/
    }
}

Related

  1. assertArgNotNull(final String argName, final Object argValue)
  2. assertArgumentNotNull(T argument, String argumentName)
  3. assertElementNotNull(Object element, Class elementClass)
  4. assertFieldNotNull(Object fieldValue, String fieldName)
  5. assertFormatResultNotNull(Object r)