Skip to content

Commit

Permalink
Add javadoc for new method
Browse files Browse the repository at this point in the history
  • Loading branch information
leepoeaik committed Apr 3, 2024
1 parent face80a commit a612858
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/seedu/address/ui/ScheduleListPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,17 @@ public class ScheduleListPanel extends UiPart<Region> {
public ScheduleListPanel(ObservableList<Student> studentList) {
super(FXML);

scheduleListView.setItems(TransformList(studentList));
scheduleListView.setItems(transformList(studentList));

Check warning on line 36 in src/main/java/seedu/address/ui/ScheduleListPanel.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/seedu/address/ui/ScheduleListPanel.java#L36

Added line #L36 was not covered by tests
scheduleListView.setCellFactory(listView -> new ScheduleListViewCell());
}

public ObservableList<Pair<Student, Lesson>> TransformList(ObservableList<Student> studentList) {
/**
* Extracts lessons from studentList
* Adds the lessons together with student as a pair and sorts it
* @param studentList observable list of students
* @return an observable list of a pair of students and lessons
*/
public ObservableList<Pair<Student, Lesson>> transformList(ObservableList<Student> studentList) {
List<Pair<Student, Lesson>> scheduleList = new ArrayList<>();
for (Student student : studentList) {
List<Lesson> studentLesson = student.getLessons();
Expand Down

0 comments on commit a612858

Please sign in to comment.