created sortByNextExecution Comparator
This commit is contained in:
parent
f389cfcdfd
commit
c9ba9c1234
|
@ -20,6 +20,7 @@ public class GardenSchedule {
|
||||||
* Comparators to create sorted Task List
|
* Comparators to create sorted Task List
|
||||||
*/
|
*/
|
||||||
static final Comparator<Task> sortByStartDate = Comparator.comparing(Task::getStartDate);
|
static final Comparator<Task> sortByStartDate = Comparator.comparing(Task::getStartDate);
|
||||||
|
static final Comparator<Task> sortByNextExecution = Comparator.comparing(Task::getNextExecution);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor to create Database Objects.
|
* Constructor to create Database Objects.
|
||||||
|
@ -176,7 +177,7 @@ public class GardenSchedule {
|
||||||
* @throws IOException If the database cannot be accessed
|
* @throws IOException If the database cannot be accessed
|
||||||
*/
|
*/
|
||||||
public List<Task> getFilteredTaskList(LocalDate start, LocalDate end) throws IOException {
|
public List<Task> getFilteredTaskList(LocalDate start, LocalDate end) throws IOException {
|
||||||
return getSortedTaskList(taskList.getTaskList(start, end), sortByStartDate);
|
return getSortedTaskList(taskList.getTaskList(start, end), sortByNextExecution);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue