Java Object NVL NVL(Object str)

Here you can find the source of NVL(Object str)

Description

NVL

License

Open Source License

Parameter

Parameter Description
Object str

Return

String

Declaration

public static String NVL(Object str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from   w  w w. j  ava  2s .  c  o m*/
     * NVL
     * 
     * @param Object
     *            str
     * @return String
     */
    public static String NVL(Object str) {
        if (str == null) {
            return "";
        }
        return NVL(str.toString());
    }

    /**
     * NVL
     * 
     * @param str
     *            str
     * @return String
     */
    public static String NVL(String str) {
        if (str == null) {
            return "";
        }
        if (str.equals("null")) {
            return "";
        }
        if (str.equals("null|null")) {
            return "";
        }
        return str;
    }
}

Related

  1. nvl(Object arg0, Object arg1)
  2. nvl(Object inputObject, Object defaultObject)
  3. NVL(Object obj, String defaultVaue)
  4. nvl(Object objInput, Object objOutput)
  5. nvl(Object source, Object alernative)
  6. nvl(Object value, Object substituteWhenNull)
  7. nvl(Object value, String defaultValue)
  8. nvl(Object value, String valueWhenNull)
  9. nvl(S obj, U nullObject)