addToUnionList(set); if (set.size() == 1) {
addToUnionList(set); if (set.size() == 1) {
addToUnionList(set); if (set.size() == 1) {
public void addToUnionList(Set<ConstraintImpl> target) { // conditions of type // @a = 1 and (@x = 1 or @y = 2) // are automatically converted to // (@a = 1 and @x = 1) union (@a = 1 and @y = 2) AndImpl and = pullOrRight(); ConstraintImpl last = and.getLastConstraint(); if (last instanceof OrImpl) { OrImpl or = (OrImpl) last; // same as above, but with the added "and" for(ConstraintImpl c : or.getConstraints()) { ArrayList<ConstraintImpl> list = and.getFirstConstraints(); list.add(c); new AndImpl(list).addToUnionList(target); } return; } target.add(this); }
public void addToUnionList(Set<ConstraintImpl> target) { // conditions of type // @a = 1 and (@x = 1 or @y = 2) // are automatically converted to // (@a = 1 and @x = 1) union (@a = 1 and @y = 2) AndImpl and = pullOrRight(); ConstraintImpl last = and.getLastConstraint(); if (last instanceof OrImpl) { OrImpl or = (OrImpl) last; // same as above, but with the added "and" for(ConstraintImpl c : or.getConstraints()) { ArrayList<ConstraintImpl> list = and.getFirstConstraints(); list.add(c); new AndImpl(list).addToUnionList(target); } return; } target.add(this); }
public void addToUnionList(Set<ConstraintImpl> target) { // conditions of type // @a = 1 and (@x = 1 or @y = 2) // are automatically converted to // (@a = 1 and @x = 1) union (@a = 1 and @y = 2) AndImpl and = pullOrRight(); ConstraintImpl last = and.getLastConstraint(); if (last instanceof OrImpl) { OrImpl or = (OrImpl) last; // same as above, but with the added "and" for(ConstraintImpl c : or.getConstraints()) { ArrayList<ConstraintImpl> list = and.getFirstConstraints(); list.add(c); new AndImpl(list).addToUnionList(target); } return; } target.add(this); }