code: public void add(TimelineEvent event, TimelineUpdater timelineUpdater) {
          events.add(event);
  
          if (timelineUpdater != null) {
              // update UI
              timelineUpdater.add(event);
          }
      }
docs: 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