/** * Removes all constants * associated with the expression * * @see Constant */ public void removeAllConstants() { for (Constant c : constantsList) c.removeRelatedExpression(this); constantsList.clear(); setExpressionModifiedFlag(); } /*=================================================
/** * Removes first occurrences of the constants * associated with the expression * * @param constants the constants (variadic parameters) * comma separated list * * @see Constant */ public void removeConstants(Constant... constants) { for (Constant constant : constants) { if (constant != null) { constantsList.remove(constant); constant.removeRelatedExpression(this); setExpressionModifiedFlag(); } } } /**
/** * Removes first occurrences of the constants * associated with the expression. * * @param constantsNames the constants names (variadic parameters) * comma separated list * * @see Constant */ public void removeConstants(String... constantsNames) { for (String constantName : constantsNames) { int constantIndex = getConstantIndex(constantName); if (constantIndex != NOT_FOUND) { Constant c = constantsList.get(constantIndex); c.removeRelatedExpression(this); constantsList.remove( constantIndex ); } } setExpressionModifiedFlag(); } /**