public Set<TimelineEvent<E>> getOverlappedEvents(TimelineEvent<E> event) {
        if (event == null) {
            return Collections.emptySet();
        }

        List<TimelineEvent<E>> overlappedEvents = null;
        for (TimelineEvent<E> e : events) {
            if (e.equals(event)) {
                // given event should not be included
                continue;
            }

            if (event.getGroup() == null && e.getGroup() != null
                    || (event.getGroup() != null && !event.getGroup().equals(e.getGroup()))) {
                // ignore different groups
                continue;
            }

            if (isOverlapping(event, e)) {
                if (overlappedEvents == null) {
                    overlappedEvents = new ArrayList<>();
                }

                overlappedEvents.add(e);
            }
        }

        if (overlappedEvents == null) {
            return Collections.emptySet();
        }

        // order overlapped events according to their start / end dates
        TreeSet<TimelineEvent<E>> orderedOverlappedEvents = new TreeSet<>(new TimelineEventComparator());
        orderedOverlappedEvents.addAll(overlappedEvents);

        return orderedOverlappedEvents;
    }
Gets all overlapped events to the given one. The given and overlapped events belong to the same group. Events are ordered
by their start dates - first events with more recent start dates and then events with older start dates. If start dates are
equal, events will be ordered by their end dates. In this case, if an event has a null end date, it is ordered before the
event with a not null end date.

@param event given event
@return TreeSet&lt;TimelineEvent&lt;E&gt;&gt; ordered overlapped events or null if no overlapping exist
primefaces/src/main/java/org/primefaces/model/timeline/TimelineModel.java