new interface implementation

This commit is contained in:
serso committed 2011-09-10 22:20:58 +04:00
1 parent 0063f193ff
commit 32941504d9
15 files changed
+808 -190

No files matched your search

+3 -3
View File
@@ -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();
}
}