- .<Word, WordCount>stream(inputTopic)
- .map((word, wordCount) ->
- {
- Entry entry = Entry.of(word.getWord(), wordCount.getCount());
- return new KeyValue<>(word.getUser(), entry);
- })
+ .<Key, Entry>stream(inputTopic)
+ .map((key, entry) -> new KeyValue<>(key.getUser(), entry))