/** * Creates a copy of this expression node, without copying children. */ @Override public Expression shallowCopy() { return new ASTLessOrEqual(id); }
public ASTLessOrEqual(ASTPath path, Object value) { super(ExpressionParserTreeConstants.JJTLESSOREQUAL); jjtAddChild(path, 0); jjtAddChild(new ASTScalar(value), 1); connectChildren(); }
protected Object evaluateNode(Object o) throws Exception { int len = jjtGetNumChildren(); if (len != 2) { return Boolean.FALSE; } Comparable c1 = ConversionUtil.toComparable(evaluateChild(0, o)); if (c1 == null) { return Boolean.FALSE; } Comparable c2 = ConversionUtil.toComparable(evaluateChild(1, o)); if (c2 == null) { return Boolean.FALSE; } return c1.compareTo(c2) <= 0 ? Boolean.TRUE : Boolean.FALSE; }
public ASTLessOrEqual(SimpleNode path, Object value) { super(ExpressionParserTreeConstants.JJTLESSOREQUAL); jjtAddChild(path, 0); jjtAddChild(new ASTScalar(value), 1); connectChildren(); }
/** * Creates a copy of this expression node, without copying children. */ public Expression shallowCopy() { return new ASTLessOrEqual(id); }
/** * @since 4.0 * @see ExpressionFactory#lessOrEqualExp(String, Object) */ static Expression lessOrEqualExp(Expression exp, Object value) { if(!(exp instanceof SimpleNode)) { throw new IllegalArgumentException("exp should be instance of SimpleNode"); } return new ASTLessOrEqual((SimpleNode)exp, value); }
/** * A convenience method to create an DB_PATH "less than or equal to" * expression. * * @since 3.0 */ public static Expression lessOrEqualDbExp(String pathSpec, Object value) { return new ASTLessOrEqual(new ASTDbPath(pathSpec), value); }
/** * A convenience method to create an OBJ_PATH "less than or equal to" expression. */ public static Expression lessOrEqualExp(String pathSpec, Object value) { return new ASTLessOrEqual(new ASTObjPath(pathSpec), value); }
case 9: jj_consume_token(9); ASTLessOrEqual jjtn003 = new ASTLessOrEqual(JJTLESSOREQUAL); boolean jjtc003 = true; jjtree.openNodeScope(jjtn003);
case 9: jj_consume_token(9); ASTLessOrEqual jjtn005 = new ASTLessOrEqual(JJTLESSOREQUAL); boolean jjtc005 = true; jjtree.openNodeScope(jjtn005);