code: public void addAllGroups(Collection<TimelineGroup> groups) {
          if (groups == null) {
              groups = new ArrayList<>();
          }
  
          groups.addAll(groups);
      }
docs: Adds all given groups to the model.
  
  @param groups collection of groups to be added