-
Notifications
You must be signed in to change notification settings - Fork 166
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
[W5.7][F11-2] Neil Mehta #459
base: master
Are you sure you want to change the base?
Conversation
Hi @neilish3re, your pull request title is invalid. For PR sent to satisfy a learning outcome, the PR name should be in the format of For team PR, the PR name should be in the format of Please follow the above format strictly and edit your title for reprocessing. Note: this comment is posted by a bot. If you believe this is done in error, please create an issue at nus-se-pr-bot and add a link to this PR. |
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.
In addition, I'm not sure if I understand where the sorting part is, could someone point it out?
import seedu.addressbook.data.person.Person; | ||
import seedu.addressbook.data.person.ReadOnlyPerson; | ||
|
||
import java.util.*; |
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 can't do this?
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.
Follow coding standards. No wild cards for imports.
import java.util.*; | ||
|
||
//Sorts contact list of persons by alphabetical order | ||
public class SortCommand extends Command{ |
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.
space needed after Command
|
||
private final Set<String> keywords; | ||
|
||
public SortCommand(Set<String> keywords){ |
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.
space needed after closing bracket
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.
This implementation of SortCommand is not correct. It performs the same action as FindCommand. Please sort this out.
import seedu.addressbook.data.person.Person; | ||
import seedu.addressbook.data.person.ReadOnlyPerson; | ||
|
||
import java.util.*; |
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.
Follow coding standards. No wild cards for imports.
|
||
import java.util.*; | ||
|
||
//Sorts contact list of persons by alphabetical order |
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.
Alphabetical order according to which attribute?
* @param keywords for searching | ||
* @return list of persons found | ||
*/ | ||
private List<ReadOnlyPerson> getPersonsWithNameContainingAnyKeyword(Set<String> keywords) { |
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.
This is a direct copy from FindCommand. I don't think this performs any sorting.
Add Sort Command Class File (just the class file, haven't been able to parse the command yet)