MCPcopy
hub / github.com/jOOQ/jOOQ / defaultIfEmpty

Method defaultIfEmpty

jOOQ/src/main/java/org/jooq/tools/StringUtils.java:195–197  ·  view source on GitHub ↗

Returns either the passed in String, or if the String is empty or null , the value of defaultStr . StringUtils.defaultIfEmpty(null, "NULL") = "NULL" StringUtils.defaultIfEmpty("", "NULL") = "NULL" StringUtils.defaultIfEmpty("bat", "NULL") = "bat" @se

(String str, String defaultStr)

Source from the content-addressed store, hash-verified

193 * @return the passed in String, or the default
194 */
195 public static String defaultIfEmpty(String str, String defaultStr) {
196 return StringUtils.isEmpty(str) ? defaultStr : str;
197 }
198
199 /**
200 * <p>Returns either the passed in CharSequence, or if the CharSequence is

Callers 3

matcherMethod · 0.80
catalogSchemaMethod · 0.80
getEmbeddables0Method · 0.80

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected