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

public void replaceItem ( @ NotNull final ComponentItem itemToBeReplaced , @ NotNull final ComponentItem replacement ) { LOG . assertTrue ( myItems . contains ( itemToBeReplaced ) ) ; final int index = myItems . indexOf ( itemToBeReplaced ) ; myItems . set ( index , replacement ) ; }
replaces specified item with the new one .
