in src/main/java/org/apache/commons/cli/OptionGroup.java [129:142]
public void setSelected(final Option option) throws AlreadySelectedException {
if (option == null) {
// reset the option previously selected
selected = null;
return;
}
// if no option has already been selected or the
// same option is being reselected then set the
// selected member variable
if (selected != null && !selected.equals(option.getKey())) {
throw new AlreadySelectedException(this, option);
}
selected = option.getKey();
}