Java Object NVL nvl(Object objInput, Object objOutput)

Here you can find the source of nvl(Object objInput, Object objOutput)

Description

nvl

License

Open Source License

Declaration

public static Object nvl(Object objInput, Object objOutput) 

Method Source Code

//package com.java2s;
/*/*from   w  ww .j  a v a 2  s. c o  m*/
 * Copyright (C) 2010 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

public class Main {
    public static Object nvl(Object objInput, Object objOutput) {
        if (objInput != null) {
            return objInput;
        } else {
            return objOutput;
        }
    }

    public static <T> T nvl(T... objs) {
        for (T obj : objs) {
            if (obj != null) {
                return obj;
            }
        }

        return null;
    }
}

Related

  1. NVL(Long l)
  2. nvl(Object a, Object b, Object c)
  3. nvl(Object arg0, Object arg1)
  4. nvl(Object inputObject, Object defaultObject)
  5. NVL(Object obj, String defaultVaue)
  6. nvl(Object source, Object alernative)
  7. NVL(Object str)
  8. nvl(Object value, Object substituteWhenNull)
  9. nvl(Object value, String defaultValue)