public interface EventBuilder<E extends Event>
Interface for common behavior for event builders.
RatingBuilder
Modifier and Type | Method and Description |
---|---|
E |
build()
Builds the event.
|
EventBuilder |
clone()
Clone this event builder.
|
EventBuilder<E> |
reset()
Clear the rating builder, as if it were freshly instantiated..
|
EventBuilder<E> |
setItemId(long iid)
Set the item ID for this event.
|
EventBuilder<E> |
setTimestamp(long ts)
Set the timestamp for this event.
|
EventBuilder<E> |
setUserId(long uid)
Set the user ID for this event.
|
EventBuilder<E> reset()
Clear the rating builder, as if it were freshly instantiated..
EventBuilder<E> setUserId(long uid)
Set the user ID for this event.
uid
- The user ID.EventBuilder<E> setItemId(long iid)
Set the item ID for this event.
iid
- The item ID.EventBuilder<E> setTimestamp(long ts)
Set the timestamp for this event.
ts
- The event timestamp.E build()
Builds the event. Built event objects are entirely independent of the event builder; the setters can be used to build a new event after this builder has built one event.
IllegalStateException
- if the builder is not ready to build an object (e.g. some needed setter has not been called).EventBuilder clone()
Clone this event builder. Useful to use an event builder in different threads.