/** * Adds constants to the expression definition. * * @param constantsList the list of constants * * @see Constant */ public void addConstants( List<Constant> constantsList) { this.constantsList.addAll( constantsList ); for (Constant c : constantsList) c.addRelatedExpression(this); setExpressionModifiedFlag(); } /**
/** * Adds constants (variadic parameters) to the expression definition. * * @param constants the constants * (comma separated list) * * @see Constant */ public void addConstants(Constant... constants) { for (Constant constant : constants) { if (constant != null) { constantsList.add(constant); constant.addRelatedExpression(this); } } setExpressionModifiedFlag(); } /**
/** * Enables to define the constant (associated with * the expression) based on the constant name and * constant value. * * @param constantName the constant name * @param constantValue the constant value * * @see Constant */ public void defineConstant(String constantName, double constantValue) { Constant c = new Constant(constantName, constantValue); c.addRelatedExpression(this); constantsList.add(c); setExpressionModifiedFlag(); } /**