src/main/java/seedu/address/logic/parser/FindCommandParser.java
/**
     * Parses the given {@code String} of arguments in the context of the FindCommand
     * and returns a FindCommand object for execution.
     * @throws ParseException if the user input does not conform the expected format
     */
Parses the given  String of arguments in the context of the FindCommand
and returns a FindCommand object for execution.
@throws ParseException if the user input does not conform the expected format
Parses the given String of arguments in the context of the FindCommand and returns a FindCommand object for execution . @throws ParseException if the user input does not conform the expected format
public FindCommand parse(String args) throws ParseException {
        String trimmedArgs = args.trim();
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_BMI);
        if (trimmedArgs.isEmpty()) {
            throw new ParseException(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));
        } else if (argMultimap.getValue(PREFIX_BMI).isPresent()) {
            double bmi = ParserUtil.parseBmi(argMultimap.getValue(PREFIX_BMI).get());
            return new FindCommand(new BelowCertainBmiPredicate(bmi));
        } else {
            String[] nameKeywords = trimmedArgs.split("\\s+");
            return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));
        }
    }
public FindCommand parse ( String args ) throws ParseException { String trimmedArgs = args . trim ( ) ; ArgumentMultimap argMultimap = ArgumentTokenizer . tokenize ( args , PREFIX_BMI ) ; if ( trimmedArgs . isEmpty ( ) ) { throw new ParseException ( String . format ( MESSAGE_INVALID_COMMAND_FORMAT , FindCommand . MESSAGE_USAGE ) ) ; } else if ( argMultimap . getValue ( PREFIX_BMI ) . isPresent ( ) ) { double bmi = ParserUtil . parseBmi ( argMultimap . getValue ( PREFIX_BMI ) . get ( ) ) ; return new FindCommand ( new BelowCertainBmiPredicate ( bmi ) ) ; } else { String [ ] nameKeywords = trimmedArgs . split ( "\\s+" ) ; return new FindCommand ( new NameContainsKeywordsPredicate ( Arrays . asList ( nameKeywords ) ) ) ; } }
Parses the given {@code String} of arguments in the context of the FindCommand
 and returns a FindCommand object for execution.
Parses the given { @code String } of arguments in the context of the FindCommand and returns a FindCommand object for execution .