counter: 1.3.1 - Splitted up test in `CounterStreamProcessorTopologyTest`
[demos/kafka/wordcount] / src / main / java / de / juplo / kafka / wordcount / counter / WordCounter.java
1 package de.juplo.kafka.wordcount.counter;
2
3 import lombok.AllArgsConstructor;
4 import lombok.Data;
5 import lombok.NoArgsConstructor;
6
7
8 @Data
9 @NoArgsConstructor
10 @AllArgsConstructor(staticName = "of")
11 public class WordCounter
12 {
13   String user;
14   String word;
15   long counter;
16
17   public static WordCounter of(Word word, long counter)
18   {
19     return new WordCounter(word.getUser(), word.getWord(), counter);
20   }
21 }