in src/main/java/org/apache/neethi/AbstractPolicyOperator.java [211:231]
private static ExactlyOne getCrossProduct(ExactlyOne exactlyOne1, ExactlyOne exactlyOne2) {
ExactlyOne crossProduct = new ExactlyOne();
All crossProductAll;
All currentAll1;
All currentAll2;
for (PolicyComponent pc : exactlyOne1.getPolicyComponents()) {
currentAll1 = (All)pc;
for (PolicyComponent pc2 : exactlyOne2.getPolicyComponents()) {
currentAll2 = (All)pc2;
crossProductAll = new All();
crossProductAll.addPolicyComponents(currentAll1.getPolicyComponents());
crossProductAll.addPolicyComponents(currentAll2.getPolicyComponents());
crossProduct.addPolicyComponent(crossProductAll);
}
}
return crossProduct;
}