int size = alternatePolicies.size();
for (int i = size - 1; i >= 0; i--) {
PolicyReference reference = (PolicyReference)
alternatePolicies.getItemProxy(i).getModelObject();
if (reference.getExpectedPolicyType().equals(type)) {
Operation removeOp = alternatePolicies
.prepareRemoveProxyItemOperation(
alternatePolicies.getItemProxy(i));
context.executeOperation(removeOp);
}
}