docs: public TimelineEvent merge(TimelineEvent event, Collection<TimelineEvent> events, TimelineUpdater timelineUpdater) {
          if (event == null) {
              // nothing to merge
              return null;
          }
  
          if (events == null || events.isEmpty()) {
              // nothing to merge
              return event;
          }
  
          // check whether all events within the same group
          String group = event.getGroup();
          for (TimelineEvent e : events) {
              if ((group == null && e.getGroup() != null) || (group != null && !group.equals(e.getGroup()))) {
                  throw new IllegalStateException("Events to be merged may be only belong to one and the same group!");
              }
          }
  
          // order events according to their start / end dates
          TreeSet<TimelineEvent> orderedEvents = new TreeSet<TimelineEvent>(new TimelineEventComparator());
          orderedEvents.add(event);
          orderedEvents.addAll(events);
  
          // find the largest end date
          Date endDate = null;
          for (TimelineEvent e : orderedEvents) {
              if (endDate == null && e.getEndDate() != null) {
                  endDate = e.getEndDate();
              }
              else if (endDate != null && e.getEndDate() != null && endDate.before(e.getEndDate())) {
                  endDate = e.getEndDate();
              }
          }
  
          TimelineEvent mergedEvent
                  = new TimelineEvent(event.getData(), orderedEvents.first().getStartDate(), endDate, event.isEditable(),
                          event.getGroup(), event.getStyleClass());
  
          // merge...
          deleteAll(events, timelineUpdater);
          update(mergedEvent, timelineUpdater);
  
          return mergedEvent;
      }