public TimelineEvent<E> getEvent(String id) {
        if (id != null) {
            return events.stream()
                    .filter(event -> id.equals(event.getId()))
                    .findAny()
                    .orElse(null);
        }
        return null;
    }
Gets event by its id property.

@param id id property of the event
@return TimelineEvent found event or null
primefaces/src/main/java/org/primefaces/model/timeline/TimelineModel.java