void (@NotNull final ComponentItem itemToBeReplaced, @NotNull final ComponentItem replacement) { LOG.assertTrue(myItems.contains(itemToBeReplaced)); final int index = myItems.indexOf(itemToBeReplaced); myItems.set(index, replacement); }