src/main/java/seedu/address/logic/parser/UpdateCommandParser.java
/**
     * Parses the given {@code userInput} of arguments in the context of the UpdateCommand
     * and returns a UpdateCommand object for execution.
     * @throws ParseException if the user input does not conform the expected format
     */
Parses the given  userInput of arguments in the context of the UpdateCommand
and returns a UpdateCommand object for execution.
@throws ParseException if the user input does not conform the expected format
Parses the given userInput of arguments in the context of the UpdateCommand and returns a UpdateCommand object for execution . @throws ParseException if the user input does not conform the expected format
@Override
    public UpdateCommand parse(String userInput) throws ParseException {
        requireNonNull(userInput);
        ArgumentMultimap argMultimap =
                    ArgumentTokenizer.tokenize(userInput, PREFIX_NAME, PREFIX_ID, PREFIX_HEIGHT, PREFIX_WEIGHT);
        UpdateCommand.UpdateProfileDescriptor updateProfileDescriptor = new UpdateCommand.UpdateProfileDescriptor();
        if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
            updateProfileDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
        }
        if (argMultimap.getValue(PREFIX_ID).isPresent()) {
            updateProfileDescriptor.setId(ParserUtil.parseID(argMultimap.getValue(PREFIX_ID).get()));
        }
        if (argMultimap.getValue(PREFIX_HEIGHT).isPresent()) {
            updateProfileDescriptor.setHeight(ParserUtil.parseHeight(argMultimap.getValue(PREFIX_HEIGHT).get()));
        }
        if (argMultimap.getValue(PREFIX_WEIGHT).isPresent()) {
            updateProfileDescriptor.setWeight(ParserUtil.parseWeight(argMultimap.getValue(PREFIX_WEIGHT).get()));
        }
        if (!updateProfileDescriptor.isAnyFieldEdited()) {
            throw new ParseException(UpdateCommand.MESSAGE_NOT_EDITED);
        }
        return new UpdateCommand(updateProfileDescriptor);
    }
@ Override public UpdateCommand parse ( String userInput ) throws ParseException { requireNonNull ( userInput ) ; ArgumentMultimap argMultimap = ArgumentTokenizer . tokenize ( userInput , PREFIX_NAME , PREFIX_ID , PREFIX_HEIGHT , PREFIX_WEIGHT ) ; UpdateCommand . UpdateProfileDescriptor updateProfileDescriptor = new UpdateCommand . UpdateProfileDescriptor ( ) ; if ( argMultimap . getValue ( PREFIX_NAME ) . isPresent ( ) ) { updateProfileDescriptor . setName ( ParserUtil . parseName ( argMultimap . getValue ( PREFIX_NAME ) . get ( ) ) ) ; } if ( argMultimap . getValue ( PREFIX_ID ) . isPresent ( ) ) { updateProfileDescriptor . setId ( ParserUtil . parseID ( argMultimap . getValue ( PREFIX_ID ) . get ( ) ) ) ; } if ( argMultimap . getValue ( PREFIX_HEIGHT ) . isPresent ( ) ) { updateProfileDescriptor . setHeight ( ParserUtil . parseHeight ( argMultimap . getValue ( PREFIX_HEIGHT ) . get ( ) ) ) ; } if ( argMultimap . getValue ( PREFIX_WEIGHT ) . isPresent ( ) ) { updateProfileDescriptor . setWeight ( ParserUtil . parseWeight ( argMultimap . getValue ( PREFIX_WEIGHT ) . get ( ) ) ) ; } if ( ! updateProfileDescriptor . isAnyFieldEdited ( ) ) { throw new ParseException ( UpdateCommand . MESSAGE_NOT_EDITED ) ; } return new UpdateCommand ( updateProfileDescriptor ) ; }
Parses the given {@code userInput} of arguments in the context of the UpdateCommand
 and returns a UpdateCommand object for execution.
Parses the given { @code userInput } of arguments in the context of the UpdateCommand and returns a UpdateCommand object for execution .