1 16 package org.apache.commons.jxpath.ri.compiler; 17 18 import org.apache.commons.jxpath.ri.EvalContext; 19 import org.apache.commons.jxpath.ri.InfoSetUtil; 20 21 27 public class CoreOperationGreaterThan extends CoreOperation { 28 29 public CoreOperationGreaterThan(Expression arg1, Expression arg2) { 30 super(new Expression[] { arg1, arg2 }); 31 } 32 33 public Object computeValue(EvalContext context) { 34 double l = InfoSetUtil.doubleValue(args[0].computeValue(context)); 35 double r = InfoSetUtil.doubleValue(args[1].computeValue(context)); 36 return l > r ? Boolean.TRUE : Boolean.FALSE; 37 } 38 39 protected int getPrecedence() { 40 return 3; 41 } 42 43 protected boolean isSymmetric() { 44 return false; 45 } 46 47 public String getSymbol() { 48 return ">"; 49 } 50 } 51 | Popular Tags |