@Test public void testIsEmpty() { Object[] testData = new Object[] { null, true, "", true, " ", false, "asdfasfd", false }; for (int i = 0; i < testData.length; i += 2) { boolean actualResult = StringUtil.isEmpty((String) testData[i]); boolean expectedResult = (Boolean) testData[i + 1]; assertEquals(expectedResult, actualResult); } }
public static boolean isEmpty(String text) { return (text == null) || (text.length() == 0); }
StringUtil { public static boolean isEmpty(String text) { return (text == null) || (text.length() == 0); } }
StringUtil { public static boolean isEmpty(String text) { return (text == null) || (text.length() == 0); }  }
StringUtil { public static boolean isEmpty(String text) { return (text == null) || (text.length() == 0); }  static String collapsePathDots(String path); static boolean isNotBlank(String text); static boolean isBlank(String text); static boolean isEmpty(String text); static boolean endsWithIgnoreCase(String source, String suffix); static String defaultIfNull(String text); static String defaultIfNull(String text, String defaultValue); static boolean equals(String text1, String text2); static String toString(Object... keyValues); static int hashCode(String... values); static String substringBefore(String text, char separator); static String substringBeforeLast(String text, char separator); static String substringAfterLast(String text, char separator); static String substringAfter(String text, char c); }
StringUtil { public static boolean isEmpty(String text) { return (text == null) || (text.length() == 0); }  static String collapsePathDots(String path); static boolean isNotBlank(String text); static boolean isBlank(String text); static boolean isEmpty(String text); static boolean endsWithIgnoreCase(String source, String suffix); static String defaultIfNull(String text); static String defaultIfNull(String text, String defaultValue); static boolean equals(String text1, String text2); static String toString(Object... keyValues); static int hashCode(String... values); static String substringBefore(String text, char separator); static String substringBeforeLast(String text, char separator); static String substringAfterLast(String text, char separator); static String substringAfter(String text, char c);  }