public static <T extends CharSequence> T defaultIfEmpty(T str, T defaultStr) {
        return StringUtils.isEmpty(str) ? defaultStr : str;
    }
<p>Returns either the passed in CharSequence, or if the CharSequence is
empty or {@code null}, the value of {@code defaultStr}.</p>

<pre>
StringUtils.defaultIfEmpty(null, "NULL")  = "NULL"
StringUtils.defaultIfEmpty("", "NULL")    = "NULL"
StringUtils.defaultIfEmpty(" ", "NULL")   = " "
StringUtils.defaultIfEmpty("bat", "NULL") = "bat"
StringUtils.defaultIfEmpty("", null)      = null
</pre>
@param <T> the specific kind of CharSequence
@param str  the CharSequence to check, may be null
@param defaultStr  the default CharSequence to return
 if the input is empty ("") or {@code null}, may be null
@return the passed in CharSequence, or the default
@see StringUtils#defaultString(String, String)
android/android_framework/base/src/main/java/lang3/StringUtils.java