public void add(TimelineEvent<E> event, TimelineUpdater timelineUpdater) {
        events.add(event);

        if (timelineUpdater != null) {
            // update UI
            timelineUpdater.add(event);
        }
    }
Adds a given event to the model with UI update.

@param event           event to be added
@param timelineUpdater TimelineUpdater instance to add the event in UI
primefaces/src/main/java/org/primefaces/model/timeline/TimelineModel.java