} catch (NumberFormatException e) {
throw new FSParsingException(e.getMessage(), e);
}
}
constraint = new InConstraint(listDouble);
} else if (value.startsWith(ParsingUtil.IN_RANGE_KEYWORD)) {
String[] lStr = value.replace(ParsingUtil.BRACKET_OPENNING, "")
.replace(ParsingUtil.BRACKET_CLOSING, "").split(ParsingUtil.COMMA);
if (lStr.length != 2) {
throw new FSParsingException("Can not parse in range constraint value: "
+ value);
}
try {
Double min = Double.parseDouble(lStr[0].trim());
Double max = Double.parseDouble(lStr[1].trim());
constraint = new MinMaxConstraint(min, max);
} catch (NumberFormatException e) {
throw new FSParsingException(e.getMessage(), e);
}
} else if (ParsingUtil.CONSTANT_KEYWORD.equals(value)) {
constraint = new ConstantConstraint();
}
if (constraint != null) {
currentParameter.addConstraint(constraint);
}
}
} else if ((key != null) && (key.startsWith(ParsingUtil.IN_LIST_KEYWORD))) {
Constraint constraint = null;
String[] lStr = value.replace(ParsingUtil.BRACKET_OPENNING, "")
.replace(ParsingUtil.BRACKET_CLOSING, "").split(ParsingUtil.COMMA);
List<Double> listDouble = new ArrayList<Double>();
try {
for (String s : lStr) {
Double d = Double.parseDouble(s.trim());
listDouble.add(d);
}
constraint = new InConstraint(listDouble);
} catch (NumberFormatException e) {
List<String> listStr = new ArrayList<String>();
for (String str : lStr) {
listStr.add(str);