Replace Array with Object

You have an array in which certain elements mean different things.

Replace the array with an object that has a field for each element.


	String[] row = new String[3];

	row [0] = "Liverpool";

	row [1] = "15";


	Performance row = new Performance();

	row.setName("Liverpool");

	row.setWins("15");

For more information see page 186 of Refactoring

| Refactoring Home | | Alphabetical List |