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

[W5.11][T12-1] Ho Phi Long #167

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

PhiLong-Ho
Copy link

Sort by name

@nus-se-pr-bot
Copy link

Hi @Tertium3, your pull request title is invalid.

For PR sent to satisfy a learning outcome, the PR name should be in the format of [Learning Outcome ID][Team ID] Your Name, where [Learning Outcome ID] has no dashes or spaces (e.g. [W3.1a]) and [Team ID] has one dash only and no spaces (e.g. [W14-2] means Wednesday 2pm (14 hrs), Team 2).
E.g. If you are in tutorial W09 (i.e. Wednesday 9am), team 1, and is submitting a PR for LO W2.2b, the PR title would be [W2.2b][W09-1] James Yong. Note that your tutorial IDs are different from those shown in CORS/IVLE.

For team PR, the PR name should be in the format of [Team ID] Product Name (e.g. [T09-2] Contact List Pro).

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.

@PhiLong-Ho PhiLong-Ho changed the title Sort feature [W5.11] [T12-1] HO PHI LONG Sep 12, 2018
@PhiLong-Ho PhiLong-Ho changed the title [W5.11] [T12-1] HO PHI LONG [W5.11][T12-1] HO PHI LONG Sep 12, 2018
@PhiLong-Ho PhiLong-Ho changed the title [W5.11][T12-1] HO PHI LONG [W5.11][T12-1] Ho Phi Long Sep 12, 2018
Copy link

@devamanyu devamanyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting by name feature implemented. Would love to see more functionality of this feature in the future.

Some comments on coding style have been added. Please close this PR after reading them.

public SortCommand() {}
public List<ReadOnlyPerson> SortList() {
//Copy the unmodifiable array to a list
List<ReadOnlyPerson> SortedList = new ArrayList<ReadOnlyPerson>(addressBook.getAllPersons().immutableListView());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if this line crosses the 120 characters hard limit. If yes, consider breaking it into two lines.

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding comments for this class, clarifying what kind of "sorting" this class is supposed to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants