src/main/java/seedu/insurancepal/logic/parser/ParserUtil.java
/**
     * Parses a {@code String revenue} into a {@code Revenue}.
     * Leading and trailing whitespaces will be trimmed.
     *
     * @throws ParseException if the given {@code revenue} is invalid.
     */
Parses a  String revenue into a  Revenue.
Leading and trailing whitespaces will be trimmed.

@throws ParseException if the given  revenue is invalid.
Parses a String revenue into a Revenue . Leading and trailing whitespaces will be trimmed . @throws ParseException if the given revenue is invalid .
public static Revenue parseRevenue(String revenue) throws ParseException {
        requireNonNull(revenue);
        String trimmedRevenue = revenue.trim();
        if (!Revenue.isValidRevenue(trimmedRevenue)) {
            throw new ParseException(Revenue.MESSAGE_CONSTRAINTS);
        }
        if (Revenue.isPlusSignPresent(revenue)) {
            throw new ParseException(Revenue.MESSAGE_INVALID_REVENUE_PLUS_SIGN);
        }
        return new Revenue(new Money(trimmedRevenue));
    }
public static Revenue parseRevenue ( String revenue ) throws ParseException { requireNonNull ( revenue ) ; String trimmedRevenue = revenue . trim ( ) ; if ( ! Revenue . isValidRevenue ( trimmedRevenue ) ) { throw new ParseException ( Revenue . MESSAGE_CONSTRAINTS ) ; } if ( Revenue . isPlusSignPresent ( revenue ) ) { throw new ParseException ( Revenue . MESSAGE_INVALID_REVENUE_PLUS_SIGN ) ; } return new Revenue ( new Money ( trimmedRevenue ) ) ; }
Parses a {@code String revenue} into a {@code Revenue}.
Parses a { @code String revenue } into a { @code Revenue } .