public IfThen(javax.constraints.Constraint c1, javax.constraints.Constraint c2) {
super(c1.getProblem());
com.exigen.ie.constrainer.Constraint myC1 = (com.exigen.ie.constrainer.Constraint)c1.getImpl();
com.exigen.ie.constrainer.Constraint myC2 = (com.exigen.ie.constrainer.Constraint)c2.getImpl();
IntBoolExp b1 = myC1.toIntBoolExp();
if (b1 == null)
throw new RuntimeException("Constraint " + c1.getName()
+ " cannot be used inside ifThen");
IntBoolExp b2 = myC2.toIntBoolExp();
if (b2 == null)
throw new RuntimeException("Constraint " + c2.getName()
+ " cannot be used inside ifThen");
setImpl(myC1.constrainer().addConstraint(b1.implies(b2)));
setName("ifThen");