Preserve Whole Object

You are getting several values from an object and passing these values as parameters in a method call.

Send the whole object instead.

		int low = daysTempRange().getLow();
		int high = daysTempRange().getHigh();
		withinPlan = plan.withinRange(low, high);										 

		withinPlan = plan.withinRange(daysTempRange());

For more information see page 288 of Refactoring

| Refactoring Home | | Alphabetical List |