+ String resultOn = "# Number of detected events of type " + UserAction.Type.TOGGLE_ON + ": " +
+ detectedEvents.stream().filter(ua -> ua.getType() == UserAction.Type.TOGGLE_ON).count();
+ String resultOff = "# Number of detected events of type " + UserAction.Type.TOGGLE_OFF + ": " +
+ detectedEvents.stream().filter(ua -> ua.getType() == UserAction.Type.TOGGLE_OFF).count();
+ String onMaximumSkippedPackets = "# Maximum number of skipped packets in ON signature " +
+ Integer.toString(onDetector.getMaxSkippedPackets());
+// String onMaxSkippedPackets = "# Number of skipped packets in ON signature: ";
+// for(Integer skippedPackets : onDetector.getMaxSkippedPackets()) {
+// System.out.println(skippedPackets);
+// }
+ String offMaximumSkippedPackets = "# Maximum number of skipped packets in OFF signature " +
+ Integer.toString(offDetector.getMaxSkippedPackets());
+// String offMaxSkippedPackets = "# Number of skipped packets in OFF signature: ";
+// for(Integer skippedPackets : offDetector.getMaxSkippedPackets()) {
+// System.out.println(skippedPackets);
+// }
+ PrintWriterUtils.println(resultOn, resultsWriter, DUPLICATE_OUTPUT_TO_STD_OUT);
+ PrintWriterUtils.println(resultOff, resultsWriter, DUPLICATE_OUTPUT_TO_STD_OUT);
+ PrintWriterUtils.println(onMaximumSkippedPackets, resultsWriter, DUPLICATE_OUTPUT_TO_STD_OUT);
+ PrintWriterUtils.println(offMaximumSkippedPackets, resultsWriter, DUPLICATE_OUTPUT_TO_STD_OUT);
+