use of java.lang.StringBuffer in project Payara by payara.
the class PEDomainConfigValidator method printDuplicatesFromMap.
/**
* Return a string representation of the given map, but only for
* those entries where the value has a size greater than 1
* @param map a map of key to Set of value
*/
private final String printDuplicatesFromMap(final Map map) {
final StringBuffer sb = new StringBuffer();
final Iterator it = map.entrySet().iterator();
Map.Entry entry = getNextDuplicate(it);
if (entry != null) {
printEntry(sb, entry);
while ((entry = getNextDuplicate(it)) != null) {
sb.append(", ");
printEntry(sb, entry);
}
}
return sb.toString();
}
Aggregations