从某个对象中取出若干值,将它们作为某一次函数调用的参数
int low = daysTempRange().getLow();
int height = daysTempRange().getHigh();
withinPlan = plan.withinRange(low, high);
重构:改为传递整个对象
withinPlan = plan.withinRange(daysTempRange());
从某个对象中取出若干值,将它们作为某一次函数调用的参数
int low = daysTempRange().getLow();
int height = daysTempRange().getHigh();
withinPlan = plan.withinRange(low, high);
重构:改为传递整个对象
withinPlan = plan.withinRange(daysTempRange());