Java Object NVL nvl(String instr, String defaultValue)

Here you can find the source of nvl(String instr, String defaultValue)

Description

nvl

License

Apache License

Declaration

public static String nvl(String instr, String defaultValue) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String nvl(String instr, String defaultValue) {
        return instr == null || "".equals(instr) ? defaultValue : instr;
    }/*from ww w . j a v a2  s . co  m*/

    public static String nvl(String instr) {
        return nvl(instr, "");
    }

    public static boolean equals(String str1, String str2) {
        if (str1 == null && str2 == null)
            return true;
        if (str1 != null && str1.equals(str2))
            return true;
        return false;
    }
}

Related

  1. nvl(Object value, Object substituteWhenNull)
  2. nvl(Object value, String defaultValue)
  3. nvl(Object value, String valueWhenNull)
  4. nvl(S obj, U nullObject)
  5. nvl(String instr, String defaultValue)
  6. nvl(String pArg1, String pArg2)
  7. nvl(String pValue)
  8. nvl(String s)
  9. nvl(String s, String def)