@Shareable public final class EventCountUserHistorySummarizer extends Object implements UserHistorySummarizer
Modifier and Type | Field and Description |
---|---|
protected Class<? extends Event> |
wantedType |
Constructor and Description |
---|
EventCountUserHistorySummarizer()
Create a summarizer that counts all events.
|
EventCountUserHistorySummarizer(Class<? extends Event> type)
Create a summarizer that counts events of a particular type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Class<? extends Event> |
eventTypeWanted()
Get the supertype of all events required by this summarizer.
|
int |
hashCode() |
SparseVector |
summarize(UserHistory<? extends Event> history)
Compute a vector summary of a user's history.
|
public EventCountUserHistorySummarizer()
@Inject public EventCountUserHistorySummarizer(@EventType @Nonnull Class<? extends Event> type)
type
- The type of event to count.public Class<? extends Event> eventTypeWanted()
UserHistorySummarizer
eventTypeWanted
in interface UserHistorySummarizer
@Nonnull public SparseVector summarize(@Nonnull UserHistory<? extends Event> history)
UserHistorySummarizer
summarize
in interface UserHistorySummarizer
history
- The history to summarize.