private OptionalInt intValue(String option) throws CliArgumentsException {
        try {
            Number number = (Number) arguments.getParsedOptionValue(option);
            return number != null ? OptionalInt.of(number.intValue()) : OptionalInt.empty();
        } catch (ParseException e) {
            throw newInvalidValueException(option, e);
        }
    }
Parses command line arguments

@author bjorncs
vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/impl/CliArguments.java