aQute.bnd.build.model.conversions.MapFormatter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biz.aQute.bndlib Show documentation
Show all versions of biz.aQute.bndlib Show documentation
bndlib: A Swiss Army Knife for OSGi
package aQute.bnd.build.model.conversions;
import java.util.Map;
import java.util.Map.Entry;
public class MapFormatter implements Converter> {
private CollectionFormatter> entrySetFormatter;
public MapFormatter(String listSeparator, Converter> entryFormatter,
String emptyOutput) {
entrySetFormatter = new CollectionFormatter>(listSeparator, entryFormatter, emptyOutput);
}
public String convert(Map input) throws IllegalArgumentException {
return entrySetFormatter.convert(input.entrySet());
}
@Override
public String error(String msg) {
return msg;
}
}