src/main/java/seedu/insurancepal/logic/parser/RevenueCommandParser.java
/**
     * Parses the given {@code String} of arguments in the context of the RevenueCommand
     * and returns a RevenueCommand object for execution.
     *
     * @param args Command input by the user to be parsed.
     * @return RevenueCommand object for execution based on the command input given.
     * @throws ParseException If the user input does not conform the expected format
     */
Parses the given  String of arguments in the context of the RevenueCommand
and returns a RevenueCommand object for execution.

@param args Command input by the user to be parsed.
@return RevenueCommand object for execution based on the command input given.
@throws ParseException If the user input does not conform the expected format
Parses the given String of arguments in the context of the RevenueCommand and returns a RevenueCommand object for execution . @param args Command input by the user to be parsed . @return RevenueCommand object for execution based on the command input given . @throws ParseException If the user input does not conform the expected format
public RevenueCommand parse(String args) throws ParseException {
        requireNonNull(args);
        ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_REVENUE);
        Index index;
        try {
            index = ParserUtil.parseIndex(argMultimap.getPreamble());
        } catch (IllegalValueException ive) {
            throw new ParseException(String.format(INVALID_REVENUE_COMMAND_FORMAT,
                    COMMAND_WORD), ive);
        }
        String revenueString = argMultimap.getValue(PREFIX_REVENUE)
                .orElseThrow(() -> new ParseException(INVALID_REVENUE_COMMAND_FORMAT));
        Revenue revenue = ParserUtil.parseRevenue(revenueString);
        return new RevenueCommand(index, revenue);
    }
public RevenueCommand parse ( String args ) throws ParseException { requireNonNull ( args ) ; ArgumentMultimap argMultimap = ArgumentTokenizer . tokenize ( args , PREFIX_REVENUE ) ; Index index ; try { index = ParserUtil . parseIndex ( argMultimap . getPreamble ( ) ) ; } catch ( IllegalValueException ive ) { throw new ParseException ( String . format ( INVALID_REVENUE_COMMAND_FORMAT , COMMAND_WORD ) , ive ) ; } String revenueString = argMultimap . getValue ( PREFIX_REVENUE ) . orElseThrow ( ( ) -> new ParseException ( INVALID_REVENUE_COMMAND_FORMAT ) ) ; Revenue revenue = ParserUtil . parseRevenue ( revenueString ) ; return new RevenueCommand ( index , revenue ) ; }
Parses the given {@code String} of arguments in the context of the RevenueCommand
 and returns a RevenueCommand object for execution.
Parses the given { @code String } of arguments in the context of the RevenueCommand and returns a RevenueCommand object for execution .