From 4d8f3c7f69b791bec6113dc700f6526f33d784f1 Mon Sep 17 00:00:00 2001 From: tingxuanp Date: Thu, 10 Oct 2024 08:20:27 +0800 Subject: [PATCH] Change method name --- src/main/java/seedu/address/logic/commands/FindCommand.java | 2 +- .../address/model/person/NameContainsKeywordsPredicate.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } }