Java Utililty Methods Object NVL

List of utility methods to do Object NVL

Description

The list of methods to do Object NVL are organized into topic(s).

Method

Tnvl(T value, T ifnull)
Replicates the Oracle NVL function, if the value is null, then substitute a different value in its place
return (value == null) ? ifnull : value;
Tnvl(T value, T replacement)
Replace an object with a replacement object if it's null
return value == null ? replacement : value;
Tnvl(T value, T replacement)
nvl
if (value == null) {
    return replacement;
return value;
Tnvl(T value, T value2)
NULL VALUE
if (value == null) {
    return value2;
return value;
Tnvl(T... objs)
nvl
for (T obj : objs) {
    if (obj != null) {
        return obj;
return null;
Tnvl(T... objs)
nvl
for (T obj : objs) {
    if (obj != null)
        return obj;
return null;
Tnvl(T... objs)
nvl
for (T obj : objs) {
    if (obj != null) {
        return obj;
return null;
Tnvl(T... values)
Returns first not null object from list, or null if all values is null.
for (T val : values) {
    if (val != null) {
        return val;
return null;
Tnvl(T... values)
nvl
if (values != null) { 
    for (T value : values) {
        if (value != null) {
            return value;
return null;
...
Objectnvl2(Object obj, Object obj1, Object obj2)
nvl
return obj == null ? obj2 : obj1;