/** * <p>Checks if the strings contain at least on empty or null element. <p/> * * <pre> * StringUtils.isAnyEmpty(null) = true * StringUtils.isAnyEmpty("") = true * StringUtils.isAnyEmpty(" ") = false * StringUtils.isAnyEmpty("abc") = false * StringUtils.isAnyEmpty("abc", "def") = false * StringUtils.isAnyEmpty("abc", null) = true * StringUtils.isAnyEmpty("abc", "") = true * StringUtils.isAnyEmpty("abc", " ") = false * </pre> * * @param ss the strings to check * @return {@code true} if at least one in the strings is empty or null */ public static boolean isAnyEmpty(final String... ss) { return !isNoneEmpty(ss); }
/** * <p>Checks if the strings contain at least on empty or null element. <p/> * * <pre> * StringUtils.isAnyEmpty(null) = true * StringUtils.isAnyEmpty("") = true * StringUtils.isAnyEmpty(" ") = false * StringUtils.isAnyEmpty("abc") = false * StringUtils.isAnyEmpty("abc", "def") = false * StringUtils.isAnyEmpty("abc", null) = true * StringUtils.isAnyEmpty("abc", "") = true * StringUtils.isAnyEmpty("abc", " ") = false * </pre> * * @param ss the strings to check * @return {@code true} if at least one in the strings is empty or null */ public static boolean isAnyEmpty(final String... ss) { return !isNoneEmpty(ss); }
public static String toQueryString(Map<String, String> ps) { StringBuilder buf = new StringBuilder(); if (ps != null && ps.size() > 0) { for (Map.Entry<String, String> entry : new TreeMap<String, String>(ps).entrySet()) { String key = entry.getKey(); String value = entry.getValue(); if (isNoneEmpty(key, value)) { if (buf.length() > 0) { buf.append("&"); } buf.append(key); buf.append("="); buf.append(value); } } } return buf.toString(); }
public static String toQueryString(Map<String, String> ps) { StringBuilder buf = new StringBuilder(); if (ps != null && ps.size() > 0) { for (Map.Entry<String, String> entry : new TreeMap<String, String>(ps).entrySet()) { String key = entry.getKey(); String value = entry.getValue(); if (isNoneEmpty(key, value)) { if (buf.length() > 0) { buf.append("&"); } buf.append(key); buf.append("="); buf.append(value); } } } return buf.toString(); }
/** * <p>Checks if the strings contain at least on empty or null element. <p/> * * <pre> * StringUtils.isAnyEmpty(null) = true * StringUtils.isAnyEmpty("") = true * StringUtils.isAnyEmpty(" ") = false * StringUtils.isAnyEmpty("abc") = false * StringUtils.isAnyEmpty("abc", "def") = false * StringUtils.isAnyEmpty("abc", null) = true * StringUtils.isAnyEmpty("abc", "") = true * StringUtils.isAnyEmpty("abc", " ") = false * </pre> * * @param ss the strings to check * @return {@code true} if at least one in the strings is empty or null */ public static boolean isAnyEmpty(final String... ss) { return !isNoneEmpty(ss); }
/** * <p>Checks if the strings contain at least on empty or null element. <p/> * * <pre> * StringUtils.isAnyEmpty(null) = true * StringUtils.isAnyEmpty("") = true * StringUtils.isAnyEmpty(" ") = false * StringUtils.isAnyEmpty("abc") = false * StringUtils.isAnyEmpty("abc", "def") = false * StringUtils.isAnyEmpty("abc", null) = true * StringUtils.isAnyEmpty("abc", "") = true * StringUtils.isAnyEmpty("abc", " ") = false * </pre> * * @param ss the strings to check * @return {@code true} if at least one in the strings is empty or null */ public static boolean isAnyEmpty(final String... ss) { return !isNoneEmpty(ss); }
public static String toQueryString(Map<String, String> ps) { StringBuilder buf = new StringBuilder(); if (ps != null && ps.size() > 0) { for (Map.Entry<String, String> entry : new TreeMap<String, String>(ps).entrySet()) { String key = entry.getKey(); String value = entry.getValue(); if (isNoneEmpty(key, value)) { if (buf.length() > 0) { buf.append("&"); } buf.append(key); buf.append("="); buf.append(value); } } } return buf.toString(); }
public static String toQueryString(Map<String, String> ps) { StringBuilder buf = new StringBuilder(); if (ps != null && ps.size() > 0) { for (Map.Entry<String, String> entry : new TreeMap<String, String>(ps).entrySet()) { String key = entry.getKey(); String value = entry.getValue(); if (isNoneEmpty(key, value)) { if (buf.length() > 0) { buf.append("&"); } buf.append(key); buf.append("="); buf.append(value); } } } return buf.toString(); }