Skip to content

Commit

Permalink
Fix more checkstyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlimdx committed Mar 27, 2024
1 parent bca9563 commit eb7994e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package seedu.address.logic.parser;

import java.util.List;

import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
import static seedu.address.logic.parser.CliSyntax.PREFIX_WARD;

import java.util.List;

import seedu.address.logic.commands.ListCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.ListKeywordsPredicate;
Expand All @@ -23,7 +23,7 @@ public class ListCommandParser implements Parser<ListCommand> {
public ListCommand parse(String args) throws ParseException {
String trimmedArgs = args.trim();
if (trimmedArgs.isEmpty()) {
return new ListCommand(); // return a ListCommand object with no predicate
return new ListCommand(); // return a ListCommand object with no predicate
}

ArgumentMultimap argMultimap =
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/seedu/address/logic/parser/ParserUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import static java.util.Objects.requireNonNull;

import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import seedu.address.commons.core.index.Index;
import seedu.address.commons.util.StringUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package seedu.address.model.person;

import java.util.function.Predicate;
import java.util.List;
import java.util.function.Predicate;

import seedu.address.commons.util.StringUtil;
import seedu.address.commons.util.ToStringBuilder;
Expand All @@ -13,6 +13,11 @@ public class ListKeywordsPredicate implements Predicate<Person> {
private final List<String> tagKeywords;
private final String wardKeyword;

/**
* Constructs a ListKeywordsPredicate object.
* @param tagKeywords List of tag keywords to filter the list of persons.
* @param wardKeyword Ward keyword to filter the list of persons.
*/
public ListKeywordsPredicate(List<String> tagKeywords, String wardKeyword) {
this.tagKeywords = tagKeywords;
this.wardKeyword = wardKeyword;
Expand Down Expand Up @@ -62,6 +67,10 @@ public String toString() {
.toString();
}

/**
* Returns a string representation of the keywords.
* @return String representation of the keywords.
*/
public String getKeywordsString() {
String tags = "\ntags: " + tagKeywords.toString()
.replace("[", "")
Expand Down

0 comments on commit eb7994e

Please sign in to comment.