/** * Creates a copy of this expression node, without copying children. */ public Expression shallowCopy() { return new ASTLess(id); }
public ASTLess(SimpleNode path, Object value) { super(ExpressionParserTreeConstants.JJTLESS); 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 ASTLess(ASTPath path, Object value) { super(ExpressionParserTreeConstants.JJTLESS); jjtAddChild(path, 0); jjtAddChild(new ASTScalar(value), 1); connectChildren(); }
/** * Creates a copy of this expression node, without copying children. */ @Override public Expression shallowCopy() { return new ASTLess(id); }
/** * @since 4.0 * @see ExpressionFactory#lessExp(String, Object) */ static Expression lessExp(Expression exp, Object value) { if(!(exp instanceof SimpleNode)) { throw new IllegalArgumentException("exp should be instance of SimpleNode"); } return new ASTLess((SimpleNode)exp, value); }
/** * A convenience method to create an DB_PATH "less than" expression. * * @since 3.0 */ public static Expression lessDbExp(String pathSpec, Object value) { return new ASTLess(new ASTDbPath(pathSpec), value); }
/** * A convenience method to create an OBJ_PATH "less than" expression. */ public static Expression lessExp(String pathSpec, Object value) { return new ASTLess(new ASTObjPath(pathSpec), value); }
case 10: jj_consume_token(10); ASTLess jjtn004 = new ASTLess(JJTLESS); boolean jjtc004 = true; jjtree.openNodeScope(jjtn004);
case 10: jj_consume_token(10); ASTLess jjtn006 = new ASTLess(JJTLESS); boolean jjtc006 = true; jjtree.openNodeScope(jjtn006);