private List<QueueTask> createQueueTasks(IDatesMapper datesMapper, Set<LimitingResourceQueueElement> list) {

        List<QueueTask> result = new ArrayList<>();

        org.zkoss.ganttz.util.Interval interval = null;

        if ( timeTracker.getFilter() != null ) {
            timeTracker.getFilter().resetInterval();
            interval = timeTracker.getFilter().getCurrentPaginationInterval();
        }

        for (LimitingResourceQueueElement each : list) {

            if ( interval != null ) {

                if ( each.getEndDate().toDateTimeAtStartOfDay().isAfter(interval.getStart().toDateTimeAtStartOfDay()) &&
                        each.getStartDate().toDateTimeAtStartOfDay()
                                .isBefore(interval.getFinish().toDateTimeAtStartOfDay()) ) {

                    result.add(createQueueTask(datesMapper, each));
                }

            } else {
                result.add(createQueueTask(datesMapper, each));
            }
        }

        return result;
    }
    private QueueComponent(final QueueListComponent queueListComponent,
                           final TimeTracker timeTracker,
                           final LimitingResourceQueue limitingResourceQueue) {

        this.queueListComponent = queueListComponent;
        this.limitingResourceQueue = limitingResourceQueue;
        this.timeTracker = timeTracker;

        createChildren(limitingResourceQueue, timeTracker.getMapper());

        /* Do not replace it with lamda */
        zoomChangedListener = new IZoomLevelChangedListener() {
            @Override
            public void zoomLevelChanged(ZoomLevel detailLevel) {
                getChildren().clear();
                createChildren(limitingResourceQueue, timeTracker.getMapper());
            }
        };

        this.timeTracker.addZoomListener(zoomChangedListener);
    }
 private QueueTask createQueueTask(LimitingResourceQueueElement element) {
     validateQueueElement(element);
     return createDivForElement(timeTracker.getMapper(), element);
 }