diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/address/logic/commands/FindCommand.java index 1a9852ed400..c8d2140ff54 100644 --- a/src/main/java/seedu/address/logic/commands/FindCommand.java +++ b/src/main/java/seedu/address/logic/commands/FindCommand.java @@ -35,7 +35,7 @@ public CommandResult execute(Model model) { model.updateFilteredPersonList(predicate); if (!model.getFilteredPersonList().isEmpty()) { - return new CommandResult(String.format(MESSAGE_FIND_PERSON_SUCCESS, predicate.displayString())); + return new CommandResult(String.format(MESSAGE_FIND_PERSON_SUCCESS, predicate.getDisplayString())); } else { return new CommandResult(MESSAGE_FIND_PERSON_UNSUCCESSFUL); } diff --git a/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java index 4d292cb369c..732e74c5ebe 100644 --- a/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java @@ -42,7 +42,7 @@ public String toString() { return new ToStringBuilder(this).add("keywords", keywords).toString(); } - public String displayString() { + public String getDisplayString() { return String.join(", ", keywords); } }