use of io.lacuna.bifurcan.IEntry in project exist by eXist-db.
the class AdaptiveWriter method writeMap.
private void writeMap(final AbstractMapType map) throws SAXException, XPathException, TransformerException {
try {
writer.write("map");
addSpaceIfIndent();
writer.write('{');
addIndent();
indent();
for (final Iterator<IEntry<AtomicValue, Sequence>> i = map.iterator(); i.hasNext(); ) {
final IEntry<AtomicValue, Sequence> entry = i.next();
write(entry.key(), "", false);
writer.write(':');
addSpaceIfIndent();
write(entry.value(), ",", true);
if (i.hasNext()) {
writer.write(',');
indent();
}
}
endIndent(null, null);
indent();
writer.write('}');
} catch (IOException e) {
throw new SAXException(e.getMessage());
}
}
Aggregations