void (ComplexPackagingElementType<?> type, boolean showContent) { if (showContent) { myTypesToSubstitute.add(type); } else { myTypesToSubstitute.remove(type); } final Iterator<ComplexPackagingElement<?>> iterator = mySubstituted.iterator(); while (iterator.hasNext()) { if (iterator.next().getType().equals(type)) { iterator.remove(); } } }