public boolean apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException, BadAttributeValueExpException, InvalidApplicationException {
if (valueList != null) {
ValueExp v = val.apply(name);
boolean numeric = v instanceof NumericValueExp;
for (ValueExp element : valueList) {
element = element.apply(name);
if (numeric) {
if (((NumericValueExp) element).doubleValue() ==
((NumericValueExp) v).doubleValue()) {
return true;
}
} else {
if (((StringValueExp) element).getValue().equals(
((StringValueExp) v).getValue())) {
return true;
}
}
}
}
return false;
}
Applies the InQueryExp on a MBean. |