Skip to content

Commit

Permalink
Reorder by alphabetic sequence for parseComparatorForKeywords in Sort…
Browse files Browse the repository at this point in the history
…CommandParser.java
  • Loading branch information
whitesnowx committed Mar 15, 2024
1 parent 8f9f620 commit 16283a8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public SortCommand parse(String args) throws ParseException {

private Comparator<Person> parseComparatorForKeywords(String keyword) throws ParseException {

if (keyword.equals(PREFIX_NAME.getPrefix())) {
if (keyword.equals(PREFIX_MODULE.getPrefix())) {
return ModuleComparator.MODULE_COMPARATOR;
} else if (keyword.equals(PREFIX_NAME.getPrefix())) {
return NameComparator.NAME_COMPARATOR;
} else if (keyword.equals(PREFIX_PHONE.getPrefix())) {
return PhoneComparator.PHONE_COMPARATOR;
} else if (keyword.equals(PREFIX_MODULE.getPrefix())) {
return ModuleComparator.MODULE_COMPARATOR;
} else if (keyword.equals(PREFIX_VENUE.getPrefix())) {
return VenueComparator.VENUE_COMPARATOR;
} else {
Expand Down

0 comments on commit 16283a8

Please sign in to comment.