-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update FindCommand to handle prefixes #68
Update FindCommand to handle prefixes #68
Conversation
Codecov ReportAttention: Patch coverage is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work so far, just some issues to bring up regarding the course predicate.
import seedu.address.commons.util.StringUtil; | ||
|
||
/** | ||
* Tests that a {@code Course}'s {@code courseCode} matches any of the keywords given. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want course matching to be exact and case-insensitive, because a tutor for CS2040 may want to exclude students from CS2040S for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've worked on this, see #71.
public boolean test(Student student) { | ||
return keywords.stream() | ||
.anyMatch(keyword -> | ||
student.getCourses().stream() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this works, but maybe for the sake of readability / slap / less nesting etc, maybe a separate function to get a student's courses as a List<String>
could be used? (Then we can do .anyMatch
here.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic for this looks good.
This PR is outdated. The issues it aimed to fix have been covered by #83. |
Code review, potentially fixes #60