package seedu.ggist.logic.commands;

import java.util.Set;

/**
 * Finds and lists all persons in address book whose name contains any of the argument keywords.
 * Keyword matching is case sensitive.
 */
public class SearchCommand extends Command {

    public static final String COMMAND_WORD = "find";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all tasks whose names contain any of "
            + "the specified keywords (not case-sensitive) and displays them as a list with index numbers.\n"
            + "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
            + "Example: " + COMMAND_WORD + " alice bob charlie";

    private final Set<String> keywords;

    public SearchCommand(Set<String> keywords) {
        this.keywords = keywords;
    }

    @Override
    public CommandResult execute() {
        model.updateFilteredPersonList(keywords);
        return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));
    }

}

@@ -624,25 +624,16 @@
 + %22 
-alice bob charlie
+buy milk
 %22;%0A%0A
@@ -838,30 +838,28 @@
 dateFiltered
-Person
+Task
 List(keyword
@@ -908,22 +908,20 @@
 ssageFor
-Person
+Task
 ListShow
@@ -950,14 +950,12 @@
 ered
-Person
+Task
 List

edit search command