public void parse() {
        for (Iterator<String> it = inputStrings.iterator() ; it.hasNext() ; ) {
            String i = it.next();
            if (isHelpSwitch(i)) {
                helpSwitchUsed = true;
                usageAndThrow();
            }
            if (i.startsWith("-")) {
                if (!isLegalSwitch(i)) {
                    usageAndThrow();
                } else if (legalUnarySwitches.keySet().contains(i)) {
                    unarySwitches.add(i);
                } else if (legalBinarySwitches.keySet().contains(i)) {
                    if (!it.hasNext()) {
                        throw new IllegalArgumentException(i+ " requires value");
                    } else {
                        String val = it.next();
                        binarySwitches.put(i, val);
                    }
                }
            } else {
                arguments.add(i);
            }
        }
        if (!requiredUnarySwitches.isEmpty() && !getUnarySwitches().containsAll(requiredUnarySwitches.keySet())) {
            usageAndThrow();
        }
        if (!requiredBinarySwitches.isEmpty() && !getBinarySwitches().keySet().containsAll(requiredBinarySwitches.keySet())) {
            usageAndThrow();
        }
        if (getArguments().size()<minArguments || getArguments().size()>maxArguments) {
            usageAndThrow();
        }
    }
Parses the command line
@throws IllegalArgumentException if a parse error occured
vespajlib/src/main/java/com/yahoo/system/CommandLineParser.java