new interface implementation
This commit is contained in:
@@ -5,13 +5,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
public static boolean isEmpty ( @Nullable String s ){
|
||||
public static boolean isEmpty ( @Nullable CharSequence s ){
|
||||
return s == null || s.length() == 0;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getNotEmpty ( @Nullable String s, @NotNull String defaultValue ){
|
||||
return isEmpty(s) ? defaultValue : s;
|
||||
public static String getNotEmpty ( @Nullable CharSequence s, @NotNull String defaultValue ){
|
||||
return isEmpty(s) ? defaultValue : s.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user