package de.juplo.kafka.wordcount.counter;
+import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
-@AllArgsConstructor(staticName = "of")
+@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class WordCounter
{
String user;
- String word;
+ String key;
long counter;
public static WordCounter of(Word word, long counter)
{
- return new WordCounter(word.getUser(), word.getWord(), counter);
+ return new WordCounter(word.getChannel(), word.getKey(), counter);
}
}