public final class Events extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator<Event> |
ITEM_TIME_COMPARATOR
Compare two item events by item, then timestamp.
|
static Comparator<Event> |
TIMESTAMP_COMPARATOR
Compare two events by timestamp.
|
static Comparator<Event> |
USER_TIME_COMPARATOR
Compare two events by user, then timestamp.
|
Modifier and Type | Method and Description |
---|---|
static Like |
like(long user,
long item)
Create a new
Like event with no timestamp. |
static Like |
like(long user,
long item,
long ts)
Create a new
Like event. |
static LikeBatch |
likeBatch(long user,
long item,
int count)
Create a
LikeBatch event with a nonzero count. |
public static final Comparator<Event> TIMESTAMP_COMPARATOR
public static final Comparator<Event> USER_TIME_COMPARATOR
public static final Comparator<Event> ITEM_TIME_COMPARATOR
public static Like like(long user, long item)
Like
event with no timestamp.user
- The user ID.item
- The item ID.Like
.public static Like like(long user, long item, long ts)
Like
event.user
- The user ID.item
- The item ID.ts
- The timestamp.Like
.