…lines 1–12 unchanged (12 lines)
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17package org.apache.commons.jxpath.ri.compiler;
18
19import org.apache.commons.jxpath.ri.EvalContext;
20import org.apache.commons.jxpath.ri.InfoSetUtil;
21/**
22 * Implementation of Expression for the operation ">=".
23 *
24 * @author Dmitri Plotnikov
25 * @version $Revision$ $Date$
26 */
27public class CoreOperationGreaterThanOrEqual extends
28 CoreOperationRelationalExpression {
29
30 public CoreOperationGreaterThanOrEqual(Expression arg1, Expression arg2) {
31 super(new Expression[] { arg1, arg2 });
32 }
33
34 public Object computeValue(EvalContext context) {
35 double l = InfoSetUtil.doubleValue(args[0].computeValue(context));
36 double r = InfoSetUtil.doubleValue(args[1].computeValue(context));
37 return l >= r ? Boolean.TRUE : Boolean.FALSE;
38 }
39
40 public String getSymbol() {
41 return ">=";
42 }
43}
44