void (Exprent oldExpr, Exprent newExpr) { if (oldExpr == instance) { instance = newExpr; } for (int i = 0; i < parameters.size(); i++) { if (oldExpr == parameters.get(i)) { parameters.set(i, newExpr); } } }