/** * Creates a copy of this expression node, without copying children. */ @Override public Expression shallowCopy() { return new ASTAdd(id); }
public ASTAdd(Object[] nodes) { super(ExpressionParserTreeConstants.JJTADD); int len = nodes.length; for (int i = 0; i < len; i++) { jjtAddChild(wrapChild(nodes[i]), i); } connectChildren(); }
@Override public void jjtClose() { super.jjtClose(); flattenTree(); } }
protected Object evaluateNode(Object o) throws Exception { int len = jjtGetNumChildren(); if (len == 0) { return null; } BigDecimal result = null; for (int i = 0; i < len; i++) { BigDecimal value = ConversionUtil.toBigDecimal(evaluateChild(i, o)); if (value == null) { return null; } result = (i == 0) ? value : result.add(value); } return result; }
public void jjtClose() { super.jjtClose(); flattenTree(); } }
public ASTAdd(Collection nodes) { super(ExpressionParserTreeConstants.JJTADD); int len = nodes.size(); Iterator it = nodes.iterator(); for (int i = 0; i < len; i++) { jjtAddChild(wrapChild(it.next()), i); } connectChildren(); }
/** * Creates a copy of this expression node, without copying children. */ public Expression shallowCopy() { return new ASTAdd(id); }
public ASTAdd(Collection<?> nodes) { super(ExpressionParserTreeConstants.JJTADD); int len = nodes.size(); Iterator<?> it = nodes.iterator(); for (int i = 0; i < len; i++) { jjtAddChild(wrapChild(it.next()), i); } connectChildren(); }
case 20: jj_consume_token(20); ASTAdd jjtn001 = new ASTAdd(JJTADD); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001);
case 25: jj_consume_token(25); ASTAdd jjtn001 = new ASTAdd(JJTADD); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001);