List of utility methods to do Null Value Convert
String | convertNull(Object o) convert Null try { String strvalue = String.valueOf(o); if (strvalue.equals(null) || strvalue.equals("null") || strvalue.length() == 0) { return ""; } else { return strvalue.trim(); } catch (Exception e) { ... |
String | convertNull(Object source) Returns the string representation of a given object or an empty string if the object is null. return convertNull(source, ""); |
String | convertNull2ZeroString(String value) convert Null Zero String if (value == null) { return ""; } else { return value; |
String | convertNullableString(Object object) convert Nullable String if (object == null) { return new String(); return object.toString(); |
String | convertNullString2Empty(Object str) Return empty string if the input string is null if (str == null) return ""; else return str.toString(); |
String | convertNullToBlank(String s) convert Null To Blank return null == s ? "" : s; |
String | convertNullToEmptyStr(String inObj) convert Null To Empty Str if (inObj == null) { return ""; return inObj; |
String | convertNullToEmptyString(Object raw) Converts null to empty string return raw == null ? "" : String.valueOf(raw); |
String | convertNullToEmptyString(String s) Returns the empty string if s is null; otherwise, returns s .
return (s == null) ? "" : s; |
String | convertNullToEmptyString(String value) Converts value to a empty string if value is null. if (value == null) { return ""; return value; |