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) {
        return nvl(instr, "");
    }/*from  w  w  w . jav  a  2s .com*/

    public static String nvl(String instr, String defaultValue) {
        return instr != null && !"".equals(instr) ? instr : defaultValue;
    }

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

Related

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