Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add javadoc for new method #65

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Loading