BagAttribute bag,
Function function,
EvaluationCtx context,
boolean allFunction,
boolean argumentsAreSwapped) {
BooleanAttribute attr = BooleanAttribute.getInstance(allFunction);
Iterator it = bag.iterator();
while (it.hasNext()) {
List params = new ArrayList();
if (! argumentsAreSwapped) {
params.add(value);
params.add((AttributeValue)(it.next()));
} else {
params.add((AttributeValue)(it.next()));
params.add(value);
}
EvaluationResult result = function.evaluate(params, context);
if (result.indeterminate())
return result;
BooleanAttribute bool =
(BooleanAttribute)(result.getAttributeValue());
if (bool.getValue() != allFunction) {
attr = bool;
break;
}
}