public void update(TimelineEvent event, TimelineUpdater timelineUpdater) {
        int index = getIndex(event);
        if (index >= 0) {
            events.set(index, event);

            if (timelineUpdater != null) {
                // update UI
                timelineUpdater.update(event, index);
            }
        }
    }
public void update ( TimelineEvent event , TimelineUpdater timelineUpdater ) { int index = getIndex ( event ) ; if ( index >= 0 ) { events . set ( index , event ) ; if ( timelineUpdater != null ) { timelineUpdater . update ( event , index ) ; } } }
Updates a given event in the model with UI update.

@param event           event to be added
@param timelineUpdater TimelineUpdater instance to update the event in UI