|
|
@@ -93,11 +93,11 @@ public class Event {
|
|
|
private final String string;
|
|
|
private final String json;
|
|
|
|
|
|
- private Event(@Event.ID int eventId, int integer, String string, String json) {
|
|
|
- this.eventId = eventId;
|
|
|
- this.integer = integer;
|
|
|
- this.string = string;
|
|
|
- this.json = json;
|
|
|
+ private Event(Builder builder) {
|
|
|
+ this.eventId = builder.eventId;
|
|
|
+ this.integer = builder.integer;
|
|
|
+ this.string = builder.string;
|
|
|
+ this.json = builder.json;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -208,7 +208,7 @@ public class Event {
|
|
|
* @return Event
|
|
|
*/
|
|
|
public Event build() {
|
|
|
- return new Event(eventId, integer, string, json);
|
|
|
+ return new Event(this);
|
|
|
}
|
|
|
}
|
|
|
}
|