boolean (@NotNull final ComponentItem originalItem, final String className) { for(int i = myItems.size() - 1; i >= 0; i--){ if(className.equals(myItems.get(i).getClassName()) && originalItem != myItems.get(i)) { return true; } } return false; }