src/main/java/seedu/address/logic/parser/parserEdit/EditFinanceCommandParser.java
public EditFinanceCommand parse(String args) throws ParseException {
        requireNonNull(args);
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DATE, PREFIX_AMOUNT, PREFIX_TAG);

        ID id;

        try {
            id = ParserUtil.parseID(argMultimap.getPreamble());
        } catch (ParseException pe) {
            throw new ParseException(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditFinanceCommand.MESSAGE_USAGE), pe);
        }

        EditFinanceDescriptor editFinanceDescriptor = new EditFinanceDescriptor();
        if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
            editFinanceDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
        }
        if (argMultimap.getValue(PREFIX_DATE).isPresent()) {
            editFinanceDescriptor.setDate(ParserUtil.parseDate(argMultimap.getValue(PREFIX_DATE).get()));
        }
        if (argMultimap.getValue(PREFIX_AMOUNT).isPresent()) {
            editFinanceDescriptor
                    .setAmount(ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get()));
        }

        parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG))
                .ifPresent(editFinanceDescriptor::setTags);

        if (!editFinanceDescriptor.isAnyFieldEdited()) {
            throw new ParseException(EditFinanceCommand.MESSAGE_NOT_EDITED);
        }

        return new EditFinanceCommand(id, editFinanceDescriptor);
    }
/**
     * Parses the given {@code String} of arguments in the context of the EditCommand and returns an
     * EditCommand 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 EditCommand and returns an
EditCommand 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 EditCommand and returns an EditCommand object for execution . @throws ParseException if the user input does not conform the expected format
public EditFinanceCommand parse(String args) throws ParseException {
        requireNonNull(args);
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DATE, PREFIX_AMOUNT, PREFIX_TAG);
        ID id;
        try {
            id = ParserUtil.parseID(argMultimap.getPreamble());
        } catch (ParseException pe) {
            throw new ParseException(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditFinanceCommand.MESSAGE_USAGE), pe);
        }
        EditFinanceDescriptor editFinanceDescriptor = new EditFinanceDescriptor();
        if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
            editFinanceDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
        }
        if (argMultimap.getValue(PREFIX_DATE).isPresent()) {
            editFinanceDescriptor.setDate(ParserUtil.parseDate(argMultimap.getValue(PREFIX_DATE).get()));
        }
        if (argMultimap.getValue(PREFIX_AMOUNT).isPresent()) {
            editFinanceDescriptor
                    .setAmount(ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get()));
        }
        parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG))
                .ifPresent(editFinanceDescriptor::setTags);
        if (!editFinanceDescriptor.isAnyFieldEdited()) {
            throw new ParseException(EditFinanceCommand.MESSAGE_NOT_EDITED);
        }
        return new EditFinanceCommand(id, editFinanceDescriptor);
    }
public EditFinanceCommand parse ( String args ) throws ParseException { requireNonNull ( args ) ; ArgumentMultimap argMultimap = ArgumentTokenizer . tokenize ( args , PREFIX_NAME , PREFIX_DATE , PREFIX_AMOUNT , PREFIX_TAG ) ; ID id ; try { id = ParserUtil . parseID ( argMultimap . getPreamble ( ) ) ; } catch ( ParseException pe ) { throw new ParseException ( String . format ( MESSAGE_INVALID_COMMAND_FORMAT , EditFinanceCommand . MESSAGE_USAGE ) , pe ) ; } EditFinanceDescriptor editFinanceDescriptor = new EditFinanceDescriptor ( ) ; if ( argMultimap . getValue ( PREFIX_NAME ) . isPresent ( ) ) { editFinanceDescriptor . setName ( ParserUtil . parseName ( argMultimap . getValue ( PREFIX_NAME ) . get ( ) ) ) ; } if ( argMultimap . getValue ( PREFIX_DATE ) . isPresent ( ) ) { editFinanceDescriptor . setDate ( ParserUtil . parseDate ( argMultimap . getValue ( PREFIX_DATE ) . get ( ) ) ) ; } if ( argMultimap . getValue ( PREFIX_AMOUNT ) . isPresent ( ) ) { editFinanceDescriptor . setAmount ( ParserUtil . parseAmount ( argMultimap . getValue ( PREFIX_AMOUNT ) . get ( ) ) ) ; } parseTagsForEdit ( argMultimap . getAllValues ( PREFIX_TAG ) ) . ifPresent ( editFinanceDescriptor :: setTags ) ; if ( ! editFinanceDescriptor . isAnyFieldEdited ( ) ) { throw new ParseException ( EditFinanceCommand . MESSAGE_NOT_EDITED ) ; } return new EditFinanceCommand ( id , editFinanceDescriptor ) ; }
Parses the given {@code String} of arguments in the context of the EditCommand and returns an
 EditCommand object for execution.
Parses the given { @code String } of arguments in the context of the EditCommand and returns an EditCommand object for execution .