@Override
	public void replace(E x, int index) {
		if (index < 0) { // If the index is too small:
			throw new ListIndexOutOfBoundsException("Index less than 0"); // Complain by throwing an exception
		}
		// The rest of the method will not be executed if an exception is thrown, so an else is not needed

		Node changeNode = this.head; // Create an object that will point to the node of the list to be changed
		for (int i = 0; i <= index && changeNode != null; i ++, changeNode = changeNode.next); // Go through the list until we end up at the correct node or reach the end

		if (changeNode != null) { // If the loop exited because the index was reached:
			changeNode.data = x; // Update the data of the node to be changed
		}

		else { // If the for loop exited because the end of the list was reached:
			throw new ListIndexOutOfBoundsException("Index too large"); // Throw an exception to alert the user to that fact
		}

	}