src/main/java/seedu/address/logic/parser/applicant/AddApplicantParser.java
@Override
    public AddApplicant parse(String args) throws ParseException {
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL,
                        PREFIX_ADDRESS, PREFIX_TAG, PREFIX_DATEAPPLIED, PREFIX_DATEINTERVIEW, PREFIX_NRIC,
                        PREFIX_QUALIFICATION, PREFIX_JOB
                );

        if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_ADDRESS, PREFIX_PHONE, PREFIX_EMAIL,
            PREFIX_NRIC, PREFIX_DATEAPPLIED)
                || !argMultimap.getPreamble().isEmpty()) {
            throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));
        }
        if (anyPrefixesPresent(argMultimap, PREFIX_DATEINTERVIEW, PREFIX_JOB, PREFIX_QUALIFICATION)) {
            throw new ParseException(String.format(MESSAGE_INVALID_FIELDS + "\n" + MESSAGE_USAGE, MESSAGE_USAGE));
        }

        Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get());
        Phone phone = ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get());
        Email email = ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL).get());
        Address address = ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS).get());
        Set<Tag> tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));
        DateApplied dateApplied = ParserUtil.parseDateApplied(argMultimap.getValue(PREFIX_DATEAPPLIED).get());
        Nric nric = ParserUtil.parseNric(argMultimap.getValue(PREFIX_NRIC).get());

        Applicant applicant = new Applicant(name, phone, email, address,
                tagList, dateApplied, nric
        );

        return new AddApplicant(applicant);
    }
/**
     * Parses the given {@code String} of arguments in the context of the AddApplicant
     * and returns an AddApplicant 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 AddApplicant
and returns an AddApplicant 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 AddApplicant and returns an AddApplicant object for execution . @throws ParseException if the user input does not conform the expected format
@Override
    public AddApplicant parse(String args) throws ParseException {
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL,
                        PREFIX_ADDRESS, PREFIX_TAG, PREFIX_DATEAPPLIED, PREFIX_DATEINTERVIEW, PREFIX_NRIC,
                        PREFIX_QUALIFICATION, PREFIX_JOB
                );
        if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_ADDRESS, PREFIX_PHONE, PREFIX_EMAIL,
            PREFIX_NRIC, PREFIX_DATEAPPLIED)
                || !argMultimap.getPreamble().isEmpty()) {
            throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));
        }
        if (anyPrefixesPresent(argMultimap, PREFIX_DATEINTERVIEW, PREFIX_JOB, PREFIX_QUALIFICATION)) {
            throw new ParseException(String.format(MESSAGE_INVALID_FIELDS + "\n" + MESSAGE_USAGE, MESSAGE_USAGE));
        }
        Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get());
        Phone phone = ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get());
        Email email = ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL).get());
        Address address = ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS).get());
        Set<Tag> tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));
        DateApplied dateApplied = ParserUtil.parseDateApplied(argMultimap.getValue(PREFIX_DATEAPPLIED).get());
        Nric nric = ParserUtil.parseNric(argMultimap.getValue(PREFIX_NRIC).get());
        Applicant applicant = new Applicant(name, phone, email, address,
                tagList, dateApplied, nric
        );
        return new AddApplicant(applicant);
    }
@ Override public AddApplicant parse ( String args ) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer . tokenize ( args , PREFIX_NAME , PREFIX_PHONE , PREFIX_EMAIL , PREFIX_ADDRESS , PREFIX_TAG , PREFIX_DATEAPPLIED , PREFIX_DATEINTERVIEW , PREFIX_NRIC , PREFIX_QUALIFICATION , PREFIX_JOB ) ; if ( ! arePrefixesPresent ( argMultimap , PREFIX_NAME , PREFIX_ADDRESS , PREFIX_PHONE , PREFIX_EMAIL , PREFIX_NRIC , PREFIX_DATEAPPLIED ) || ! argMultimap . getPreamble ( ) . isEmpty ( ) ) { throw new ParseException ( String . format ( MESSAGE_INVALID_COMMAND_FORMAT , MESSAGE_USAGE ) ) ; } if ( anyPrefixesPresent ( argMultimap , PREFIX_DATEINTERVIEW , PREFIX_JOB , PREFIX_QUALIFICATION ) ) { throw new ParseException ( String . format ( MESSAGE_INVALID_FIELDS + "\n" + MESSAGE_USAGE , MESSAGE_USAGE ) ) ; } Name name = ParserUtil . parseName ( argMultimap . getValue ( PREFIX_NAME ) . get ( ) ) ; Phone phone = ParserUtil . parsePhone ( argMultimap . getValue ( PREFIX_PHONE ) . get ( ) ) ; Email email = ParserUtil . parseEmail ( argMultimap . getValue ( PREFIX_EMAIL ) . get ( ) ) ; Address address = ParserUtil . parseAddress ( argMultimap . getValue ( PREFIX_ADDRESS ) . get ( ) ) ; Set < Tag > tagList = ParserUtil . parseTags ( argMultimap . getAllValues ( PREFIX_TAG ) ) ; DateApplied dateApplied = ParserUtil . parseDateApplied ( argMultimap . getValue ( PREFIX_DATEAPPLIED ) . get ( ) ) ; Nric nric = ParserUtil . parseNric ( argMultimap . getValue ( PREFIX_NRIC ) . get ( ) ) ; Applicant applicant = new Applicant ( name , phone , email , address , tagList , dateApplied , nric ) ; return new AddApplicant ( applicant ) ; }
Parses the given {@code String} of arguments in the context of the AddApplicant
 and returns an AddApplicant object for execution.
Parses the given { @code String } of arguments in the context of the AddApplicant and returns an AddApplicant object for execution .