Here you can find the source of nvl(T t, String message)
Parameter | Description |
---|---|
t | The object to test |
message | The message to associate with the exception, Ignored if null |
public static <T> T nvl(T t, String message)
//package com.java2s; //License from project: Apache License public class Main { /**/*w w w . j a v a2 s .co m*/ * Tests the passed object for nullness. Throws an {@link IllegalArgumentException} if the object is null * @param t The object to test * @param message The message to associate with the exception, Ignored if null * @return the object passed in if not null */ public static <T> T nvl(T t, String message) { if (t == null) throw new IllegalArgumentException(message != null ? message : "Null parameter"); return t; } }