1 package com.calipso.reportgenerator.reportcalculator.expression; 2 3 import java.io.Serializable ; 4 5 9 10 public class BinaryExp extends Expression implements Serializable { 11 12 public BinaryExp() { 13 initialize(); 14 } 15 16 21 public BinaryExp(Expression left, Expression right) { 22 initialize(); 23 setLeft(left); 24 setRight(right); 25 } 26 27 30 protected void initialize() { 31 arguments = new Expression[2]; 32 } 33 34 38 public Expression getLeft() { 39 return arguments[0]; 40 } 41 42 46 public void setLeft(Expression left) { 47 arguments[0] = left; 48 } 49 50 54 public Expression getRight() { 55 return arguments[1]; 56 } 57 58 59 63 public void setRight(Expression right) { 64 arguments[1] = right; 65 } 66 67 71 protected String asStringUnderAnd() { 72 return "(" + basicAsString() + ")"; 73 } 74 75 79 protected String asStringUnderOr() { 80 return "(" + basicAsString() + ")"; 81 } 82 83 87 protected String asStringUnderNot() { 88 return "(" + basicAsString() + ")"; 89 } 90 91 } 92 | Popular Tags |