package seedu.address.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 FindCommand extends Command {

    public static final String COMMAND_WORD = "find";
    public static final String PREFIX_NAME = "/n";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all tasks whose names contain any of "
            + "the specified keywords (case-sensitive) and displays them as a list with index numbers.\n"
            + "Parameters: n/NAME \n"
            + "Example: " + COMMAND_WORD + " n/meeting";

    private final Set<String> keywords;
    private final String prefix;

    public FindCommand(String pre, Set<String> keywords) {
        this.prefix = pre;
        this.keywords = keywords;
    }

    @Override
    public CommandResult execute() {
        if (prefix == PREFIX_NAME) {
            model.updateFilteredPersonList(keywords);
            return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));
        } else {
            model.updateFilteredPersonList(keywords);
            return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));
        }
    }

}

@@ -936,12 +936,16 @@
 efix
- == 
+.equals(
 PREF
@@ -952,16 +952,17 @@
 IX_NAME)
+)
  %7B%0A     

replace == with equals