public void setOptions(String[] options) throws Exception {
String tmpStr;
String classname;
String[] options2;
Vector objects;
Range range;
super.setOptions(options);
setRemoveUnused(Utils.getFlag("U", options));
objects = new Vector();
while ((tmpStr = Utils.getOption("F", options)).length() != 0) {
options2 = Utils.splitOptions(tmpStr);
classname = options2[0];
options2[0] = "";
objects.add(Utils.forName(Filter.class, classname, options2));
}
// at least one filter
if (objects.size() == 0)
objects.add(new AllFilter());
setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));
objects = new Vector();
while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
if (tmpStr.startsWith("inv(") && tmpStr.endsWith(")")) {
range = new Range(tmpStr.substring(4, tmpStr.length() - 1));
range.setInvert(true);
}
else {
range = new Range(tmpStr);
}
objects.add(range);
}
// at least one Range
if (objects.size() == 0)
objects.add(new Range("first-last"));
setRanges((Range[]) objects.toArray(new Range[objects.size()]));
// is number of filters the same as ranges?
checkDimensions();