code: public void addGroup(TimelineGroup group) {
          if (groups == null) {
              groups = new ArrayList<>();
          }
  
          groups.add(group);
      }
docs: Adds a given group to the model.
  
  @param group group to be added