public void addGroup(TimelineGroup<G> group) {
        if (groups == null) {
            groups = new ArrayList<>();
        }

        groups.add(group);
    }
Adds a given group to the model.

@param group group to be added
primefaces/src/main/java/org/primefaces/model/timeline/TimelineModel.java