예제 #1
0
 public BooleanExp replace(String name, BooleanExp exp) {
   return new AndExp(operand1.replace(name, exp), operand2.replace(name, exp));
 }
예제 #2
0
 public BooleanExp copy() {
   return new AndExp(operand1.copy(), operand2.copy());
 }
예제 #3
0
 public boolean evaluate(Context context) {
   return operand1.evaluate(context) && operand2.evaluate(context);
 }
예제 #4
0
 public BooleanExp replace(String name, BooleanExp exp) {
   if (this.name.equals(name)) return exp.copy();
   else return copy();
 }
예제 #5
0
 public BooleanExp copy() {
   return new NotExp(exp.copy());
 }
예제 #6
0
 public BooleanExp replace(String name, BooleanExp exp) {
   return new NotExp(exp.replace(name, exp));
 }
예제 #7
0
 public boolean evaluate(Context context) {
   return !exp.evaluate(context);
 }