1 7 8 package javax.management; 9 10 11 18 class AndQueryExp extends QueryEval implements QueryExp { 19 20 21 private static final long serialVersionUID = -1081892073854801359L; 22 23 26 private QueryExp exp1; 27 28 31 private QueryExp exp2; 32 33 34 37 public AndQueryExp() { 38 } 39 40 43 public AndQueryExp(QueryExp q1, QueryExp q2) { 44 exp1 = q1; 45 exp2 = q2; 46 } 47 48 49 52 public QueryExp getLeftExp() { 53 return exp1; 54 } 55 56 59 public QueryExp getRightExp() { 60 return exp2; 61 } 62 63 77 public boolean apply(ObjectName name) throws BadStringOperationException , BadBinaryOpValueExpException , 78 BadAttributeValueExpException , InvalidApplicationException { 79 return exp1.apply(name) && exp2.apply(name); 80 } 81 82 85 public String toString() { 86 return "(" + exp1 + ") and (" + exp2 + ")"; 87 } 88 89 } 90 91 | Popular Tags |