Here you can find the source of nvl(T o, T replacement)
public static <T extends Object> T nvl(T o, T replacement)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from ww w. java 2 s . co m*/ * Returns the passed object, if not null, or replacement otherwise */ public static <T extends Object> T nvl(T o, T replacement) { return (isNull(o) ? replacement : o); } /** * Returns true if object is null or empty String */ public static boolean isNull(Object o) { return o == null || o.equals(""); } }