List of utility methods to do Null Value Convert
String | null2Length0(String s) null Length return s == null ? "" : s; |
String | null2NA(String str) null NA return null != str ? str : "NA"; |
String | Null2Space(String str) Null Space if (str == null) return ""; else if (str.equals("null") || str.equals("NULL")) return ""; else return str; |
String | null2Str(Object obj) null Str if ((obj == null) || (obj.equals("null")) || (obj.equals(""))) { return ""; } else { return obj.toString().trim(); |
String | null2Str(String str) null Str return null2Str(str, ""); |
String | null2String(Object obj) Converts null to empty string, otherwise returns it directly.
return obj == null ? "" : obj.toString(); |
String | null2String(String str) null String String str2 = new String(); if (str == null) { str2 = ""; } else { str2 = str; return str2; |
String | null2String(String string) null String return string == null ? "" : string; |
String | null2void(String str) nullvoid if (isNull(str)) { str = ""; return str; |