void () { Set<Pair<String, String>> pairs = new HashSet<>(); for (int i = 0; i < myLines.size() - 1; i += 2) { pairs.add(Pair.create(myLines.get(i), myLines.get(i + 1))); } myNotificationSink.notifyMapping(pairs); }