Simplify unsorted output
Change-Id: Ib1cfb1949903ad812cceedc886ae425d6f58395c
diff --git a/src/main/java/org/ids_mannheim/TotalNGrams.java b/src/main/java/org/ids_mannheim/TotalNGrams.java
index 717fc08..afd0670 100644
--- a/src/main/java/org/ids_mannheim/TotalNGrams.java
+++ b/src/main/java/org/ids_mannheim/TotalNGrams.java
@@ -184,10 +184,9 @@
if (!sort) {
logger.info("Writing unsorted frequency table.");
System.err.println("Writing unsorted frequency table.");
- map.entrySet()
- .forEach(entry -> output_stream.println(new StringBuilder(entry.getKey())
- .append('\t')
- .append(Integer.toUnsignedString(entry.getValue().get()))));
+ map.forEach((key, value) -> output_stream.println(key +
+ '\t' +
+ Integer.toUnsignedString(value.get())));
} else {
logger.info("Sorting and writing frequency table.");
System.err.println("Sorting and writing frequency table.");