@SuppressWarnings("ConstantConditions") @Test public void testEmptyString() { assertTrue(isEmpty(null)); assertTrue(isEmpty("")); assertFalse(isEmpty("hello world")); }
public static boolean isEmpty(String s) { return s == null || s.length() == 0; }
Strings { public static boolean isEmpty(String s) { return s == null || s.length() == 0; } }
Strings { public static boolean isEmpty(String s) { return s == null || s.length() == 0; } private  Strings(); }
Strings { public static boolean isEmpty(String s) { return s == null || s.length() == 0; } private  Strings(); static String toCsv(List<String> src); static String join(List<String> src, String delimiter); static String capitaliseFirstLetter(String string); static String lowercaseFirstLetter(String string); static String zeros(int n); static String repeat(char value, int n); static boolean isEmpty(String s); static byte[] asciiToHex(String asciiValue, int length); static String hexStringToAscii(String hexStr); }
Strings { public static boolean isEmpty(String s) { return s == null || s.length() == 0; } private  Strings(); static String toCsv(List<String> src); static String join(List<String> src, String delimiter); static String capitaliseFirstLetter(String string); static String lowercaseFirstLetter(String string); static String zeros(int n); static String repeat(char value, int n); static boolean isEmpty(String s); static byte[] asciiToHex(String asciiValue, int length); static String hexStringToAscii(String hexStr);  }