* @param mapto a mapto string value
* @throws OptionException
*/
public void addLegalValue(String value, String desc, String mapto) throws MaltChainedException {
if (value == null || value.equals("")) {
throw new OptionException("The legal value is missing for the option "+getName()+".");
} else if (legalValues.contains(value.toLowerCase())) {
throw new OptionException("The legal value "+value+" already exists for the option "+getName()+". ");
} else {
legalValues.add(value.toLowerCase());
if (desc == null || desc.equals("")) {
legalValueDesc.put(value.toLowerCase(), "Description is missing. ");
} else {
legalValueDesc.put(value.toLowerCase(), desc);
}
if (mapto == null || mapto.equals("")) {
throw new OptionException("A mapto value is missing for the option "+getName()+". ");
} else {
valueMapto.put(value, mapto);
maptoValue.put(mapto, value);
}
}