@Test @SuppressWarnings("ConstantConditions") public void testIsEmpty() { String string = null; assertTrue(StringUtils.isEmpty(string)); string = ""; assertTrue(StringUtils.isEmpty(string)); string = "Hello"; assertFalse(StringUtils.isEmpty(string)); List<String> list = null; assertTrue(StringUtils.isEmpty(list)); list = new ArrayList<>(); assertTrue(StringUtils.isEmpty(list)); list.add("hello"); assertFalse(StringUtils.isEmpty(list)); }
public static boolean isEmpty(String value) { return value == null || value.isEmpty(); }
StringUtils { public static boolean isEmpty(String value) { return value == null || value.isEmpty(); } }
StringUtils { public static boolean isEmpty(String value) { return value == null || value.isEmpty(); } private  StringUtils(); }
StringUtils { public static boolean isEmpty(String value) { return value == null || value.isEmpty(); } private  StringUtils(); static String getStringForList(List<? extends Object> objects); static String getStringForList(List<? extends Object> objects, final String delimiter); static String urlEncode(String s); static String urlDecode(String s); static String encode(String s); static String decode(String s); static boolean isEmpty(String value); static boolean nonEmpty(String value); @SuppressWarnings("rawtypes") static boolean isEmpty(Collection collection); @SuppressWarnings("rawtypes") static boolean nonEmpty(Collection collection); static String createDataTypeDisplayName(String dataType); static void setURL(URL u); }
StringUtils { public static boolean isEmpty(String value) { return value == null || value.isEmpty(); } private  StringUtils(); static String getStringForList(List<? extends Object> objects); static String getStringForList(List<? extends Object> objects, final String delimiter); static String urlEncode(String s); static String urlDecode(String s); static String encode(String s); static String decode(String s); static boolean isEmpty(String value); static boolean nonEmpty(String value); @SuppressWarnings("rawtypes") static boolean isEmpty(Collection collection); @SuppressWarnings("rawtypes") static boolean nonEmpty(Collection collection); static String createDataTypeDisplayName(String dataType); static void setURL(URL u); static final String ALPHA_NUM_REGEXP; static final String ALPHA_NUM_UNDERSCORE_DOT_REGEXP; static final String ALPHA_NUM_SPACE_REGEXP; static final RegExp EXPRESSION; }