@Override protected Object getPropertyInternal(final String key) { final Object value = map.get(key); if (value instanceof String) { final Collection<String> list = getListDelimiterHandler().split((String) value, !isTrimmingDisabled()); return list.size() > 1 ? list : list.iterator().next(); } return value; }
/** * Takes care of list delimiters in property values. This method checks if * delimiter parsing is enabled and the passed in value contains a delimiter * character. If this is the case, a split operation is performed. * * @param value the property value to be examined * @return the processed value */ protected Object handleDelimiters(Object value) { if (value instanceof String) { final Collection<String> values = getListDelimiterHandler().split((String) value, true); value = values.size() > 1 ? values : values.iterator().next(); } return value; } }
getListDelimiterHandler().split(value, true); for (final String f : files)
/** * Creates the node(s) for the given key value-pair. If delimiter parsing is * enabled, the value string is split if possible, and for each single value * a node is created. Otherwise only a single node is added to the section. * * @param sectionBuilder the section builder for adding new nodes * @param key the key * @param value the value string */ private void createValueNodes(final ImmutableNode.Builder sectionBuilder, final String key, final String value) { final Collection<String> values = getListDelimiterHandler().split(value, false); for (final String v : values) { sectionBuilder.addChild(new ImmutableNode.Builder().name(key) .value(v).create()); } }
values = getListDelimiterHandler().split(value, trim);