new interface implementation
This commit is contained in:
1 parent
0063f193ff
commit
32941504d9
15 files changed
+808
-190
No files matched your search
@@ -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