private List<TaskElement> filterTasksByDate( Collection<TaskElement> tasks, AvailabilityTimeLine.Interval interval) { List<TaskElement> result = new ArrayList<TaskElement>(); for (TaskElement task : tasks) { if (interval.includes(task.getStartAsLocalDate()) || interval.includes(task.getEndAsLocalDate())) { result.add(task); } } return result; }
private List<WorkReportLine> filterWorkReportLinesByDate( Collection<WorkReportLine> lines, AvailabilityTimeLine.Interval interval) { List<WorkReportLine> result = new ArrayList<WorkReportLine>(); for (WorkReportLine line : lines) { if (interval.includes(line.getLocalDate())) { result.add(line); } } return result; }