/** * Splits a comma separated value <code>String</code>, trimming leading and trailing whitespace on each value. * @param str a comma separated <String> with values * @return a <code>Collection</code> of <code>String</code> values */ public static Collection<String> getTrimmedStringCollection(String str){ return Arrays.asList(getTrimmedStrings(str)); }
/** * Splits a comma separated value <code>String</code>, trimming leading and trailing whitespace on each value. * @param str a comma separated <String> with values * @return a <code>Collection</code> of <code>String</code> values */ public static Collection<String> getTrimmedStringCollection(String str){ return Arrays.asList(getTrimmedStrings(str)); }
/** * Get the comma delimited values of the <code>name</code> property as * an array of <code>String</code>s, trimmed of the leading and trailing whitespace. * If no such property is specified then an empty array is returned. * * @param name property name. * @return property value as an array of trimmed <code>String</code>s, * or empty array. */ public String[] getTrimmedStrings(String name) { String valueString = get(name); return StringUtils.getTrimmedStrings(valueString); }
/** * Get the comma delimited values of the <code>name</code> property as * an array of <code>String</code>s, trimmed of the leading and trailing whitespace. * If no such property is specified then an empty array is returned. * * @param name property name. * @return property value as an array of trimmed <code>String</code>s, * or empty array. */ public String[] getTrimmedStrings(String name) { String valueString = get(name); return StringUtils.getTrimmedStrings(valueString); }
/** * Get the comma delimited values of the <code>name</code> property as * an array of <code>String</code>s, trimmed of the leading and trailing whitespace. * If no such property is specified then default value is returned. * * @param name property name. * @param defaultValue The default value * @return property value as an array of trimmed <code>String</code>s, * or default value. */ public String[] getTrimmedStrings(String name, String... defaultValue) { String valueString = get(name); if (null == valueString) { return defaultValue; } else { return StringUtils.getTrimmedStrings(valueString); } }
/** * Get the comma delimited values of the <code>name</code> property as * an array of <code>String</code>s, trimmed of the leading and trailing whitespace. * If no such property is specified then default value is returned. * * @param name property name. * @param defaultValue The default value * @return property value as an array of trimmed <code>String</code>s, * or default value. */ public String[] getTrimmedStrings(String name, String... defaultValue) { String valueString = get(name); if (null == valueString) { return defaultValue; } else { return StringUtils.getTrimmedStrings(valueString); } }