List of utility methods to do Object NVL
String | nvl(String x, String y) nvl if (x == null || x.length() == 0) return y; else return x; |
T | nvl(T mainValue, T... fallbackValues) Allows a list of values to be provided, the first non-null value in the list is returned as the result. T result = mainValue; int idx = 0; while (result == null && idx < fallbackValues.length) { result = fallbackValues[idx++]; return result; |
T | nvl(T o, T replacement) Returns the passed object, if not null, or replacement otherwise return (isNull(o) ? replacement : o);
|
T | nvl(T o, T valueIfNull) nvl if (isEmpty(o)) { return valueIfNull; return o; |
T | nvl(T object, T defaultValue) plsql has one or two useful functions and this is one of them. return object != null ? object : defaultValue;
|
T | nvl(T s, T def) nvl return s != null ? s : def;
|
T | nvl(T t, String message) Tests the passed object for nullness. if (t == null) throw new IllegalArgumentException(message != null ? message : "Null parameter"); return t; |
T | nvl(T t, String message) nvl if (t == null) throw new IllegalArgumentException(message); return (T) t; |
String | nvl(T value, String defValue) nvl return ((value != null) ? String.valueOf(value) : defValue);
|
T | nvl(T value, T defaultValue) Returns the default value if the value is null. return value != null ? value : defaultValue;
|