1 43 44 package org.exolab.jms.selector; 45 46 47 56 abstract class BinaryOperator extends Operator { 57 58 61 private final Expression _lhs; 62 63 66 private final Expression _rhs; 67 68 75 public BinaryOperator(final String operator, final Expression lhs, 76 final Expression rhs) { 77 super(operator); 78 _lhs = lhs; 79 _rhs = rhs; 80 } 81 82 87 public final Expression left() { 88 return _lhs; 89 } 90 91 96 public final Expression right() { 97 return _rhs; 98 } 99 100 105 public final String toString() { 106 StringBuffer result = new StringBuffer (); 107 result.append('('); 108 result.append(_lhs.toString()); 109 result.append(' '); 110 result.append(operator()); 111 result.append(' '); 112 result.append(_rhs.toString()); 113 result.append(')'); 114 return result.toString(); 115 } 116 117 } | Popular Tags |