public final class History extends Object
Modifier and Type | Method and Description |
---|---|
static <E extends Event> |
forItem(long id)
Create an empty history for a particular item.
|
static <E extends Event> |
forItem(long id,
Iterable<? extends E> events)
Create an event collection for a particular item.
|
static <E extends Event> |
forUser(long id)
Create an empty history for a particular user.
|
static <E extends Event> |
forUser(long id,
E... events)
Create a history for a particular user with an array of events.
|
static <E extends Event> |
forUser(long id,
List<? extends E> events)
Create a history for a particular user.
|
@Nonnull public static <E extends Event> UserHistory<E> forUser(long id, List<? extends E> events)
E
- The root type of the events in the history.id
- The user ID.events
- The events.@Nonnull public static <E extends Event> UserHistory<E> forUser(long id)
E
- The type of event in the history.id
- The user ID.@Nonnull public static <E extends Event> UserHistory<E> forUser(long id, E... events)
E
- The type of event in the history.id
- The user ID.events
- The events.@Nonnull public static <E extends Event> ItemEventCollection<E> forItem(long id, Iterable<? extends E> events)
E
- The root type of the events in the history.id
- The item ID.events
- The events.@Nonnull public static <E extends Event> ItemEventCollection<E> forItem(long id)
E
- The type of event in the history.id
- The item ID.