private String getParam(List<String> args, String arg) throws IllegalArgumentException {
        try {
            return args.remove(0);
        } catch (Exception e) {
            System.err.println("--" + arg + " requires an argument");
            throw new IllegalArgumentException(arg);
        }
    }
Argument parsing class for the vespa feeder.
vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java