Remove all components that have previously been added by calling
{@link #addToAccordion}
977359
public void clearAccordion()
    {
        List<JComponent> components = 
            new ArrayList<JComponent>(collapsiblePanels.keySet());
        for (JComponent component : components)
        {
            removeFromAccordion(component);
        }
    }
449996
private void removeExistingTable(VerticalLayout layout) {

        List<Component> tobeRemoved = new ArrayList<Component>();
        Iterator<Component> it = layout.iterator();
        while (it.hasNext()) {
            Component comp = it.next();
            if ((comp instanceof FixedHeightPanel) | (comp instanceof TextField) | (comp instanceof VerticalLayout)) {
                tobeRemoved.add(comp);
            }
        }
        for (Component c : tobeRemoved) {
            layout.removeComponent(c);
        }
    }
427543
@VisibleForTesting
  void clear() {
    insertServiceName.clear();
    if (insertRemoteServiceName != null) insertRemoteServiceName.clear();
    insertSpanName.clear();
    indexer.clear();
    if (insertAutocompleteValue != null) insertAutocompleteValue.clear();
  }
1275558
public Panel removeAllComponents() {
        synchronized(components) {
            for(Component component : new ArrayList<Component>(components)) {
                removeComponent(component);
            }
        }
        return this;
    }
218773
@Override
    public void removeAllAtomContainers() {
        for (int pos = atomContainerCount - 1; pos >= 0; pos--) {
            atomContainers[pos].removeListener(this);
            multipliers[pos] = 0.0;
            atomContainers[pos] = null;
        }
        atomContainerCount = 0;
        notifyChanged();
    }
1077983
protected Component newRemoveAllComponent() {
        return new PaletteButton("removeAllButton") {
            private static final long serialVersionUID = 1L;

            protected void onComponentTag(ComponentTag tag) {
                super.onComponentTag(tag);
                tag.getAttributes().put("onclick", getRemoveAllOnClickJS());
            }
        };
    }
987479
def purgeAutoSelected(self):
        """"""
        params = self._autoParams.allData()
        for p in params:
            comps_to_remove = []
            for comp in p['selection']:
                if self.indexByComponent(comp) is None:
                    comps_to_remove.append(comp)
            for orphaned in comps_to_remove:
                p['selection'].remove(orphaned)
1331585
protected void removeEmptyResourceFields() {

        Set<Component> componentsToRemove = new HashSet<Component>();
        int count = 0;
        Component lastElement = null;

        for (Component c : m_resources) {
            if (c instanceof CmsRemovableFormRow<?>) {
                count++;
                AbstractField<?> field = (AbstractField<?>)((CmsRemovableFormRow)c).getInput();
                String value = (String)(field.getValue());
                if (value.isEmpty()) {
                    componentsToRemove.add(c);
                    lastElement = c;
                }
            }
        }

        //if all fields are empty -> keep one of them to attach validator to
        if (componentsToRemove.size() == count) {
            componentsToRemove.remove(lastElement);
        }

        if (count == 0) {
            addResource("");
        }

        for (Component c : componentsToRemove) {
            m_resources.removeComponent(c);
            m_componentsToValidate.remove(c);
        }
    }
534959
public void clear() {
		for (Object component : store.values()) {
			try {
				Event.of(Passivated.class).on(component).fire();
			} catch (Exception e) {}
		}
		
		for (Object component : store.values()) {
			try {
				Event.of(Destroyed.class).on(component).fire();
			} catch (Exception e) {}
		}
		
		store.clear();
	}
41330
public final void revert() {

        if (tagged) {

            // Remove the added entries
            final Iterator<K> addedIt = added.keySet().iterator();
            while (addedIt.hasNext()) {
                final K key = addedIt.next();
                map.remove(key);
                addedIt.remove();
            }

            // Replace the changed entries
            final Iterator<K> changedIt = changed.keySet().iterator();
            while (changedIt.hasNext()) {
                final K key = changedIt.next();
                final V value = changed.get(key);
                map.put(key, value);
                changedIt.remove();
            }

            // Add the removed entries
            final Iterator<K> removedIt = removed.keySet().iterator();
            while (removedIt.hasNext()) {
                final K key = removedIt.next();
                final V value = removed.get(key);
                map.put(key, value);
                removedIt.remove();
            }

        }

    }
158931
@SafeVarargs
    public static <T> T[] removeAll(final T[] a, final Object... elements) {
        if (N.isNullOrEmpty(a)) {
            return a;
        } else if (N.isNullOrEmpty(elements)) {
            return a.clone();
        } else if (elements.length == 1) {
            return removeAllOccurrences(a, elements[0]);
        }

        final Set<Object> set = N.asSet(elements);
        final List<T> result = new ArrayList<>();

        for (T e : a) {
            if (!set.contains(e)) {
                result.add(e);
            }
        }

        return result.toArray((T[]) N.newArray(a.getClass().getComponentType(), result.size()));
    }
502000
private void removeUseless() {
    Set<Map.Entry<String, PropertyNode>> entries = _children.entrySet();
    for (Iterator<Map.Entry<String, PropertyNode>> it = entries.iterator(); it.hasNext(); ) {
      Map.Entry<String, PropertyNode> entry = it.next();
      PropertyNode child = entry.getValue();
      child.removeUseless();
      if (child.isUseless()) {
        it.remove();
      }
    }
  }
125606
public synchronized void removeAll() {
        for (final AttributeCache cache : attributeCacheMap.values()) {
            cache.stopRefresh();
        }
        attributeCacheMap.clear();
        extTrigAttributeCacheMap.clear();
        for (final CommandCache cache : commandCacheMap.values()) {
            cache.stopRefresh();
        }
        commandCacheMap.clear();
        extTrigCommandCacheMap.clear();
        if (stateCache != null) {
            stateCache.stopRefresh();
            stateCache = null;
        }
        if (statusCache != null) {
            statusCache.stopRefresh();
            statusCache = null;
        }
        cacheList.remove(deviceName);
    }
339081
protected void doClose(int tabIndex) {
        if (tabCloseListener == null || tabCloseListener.tabAboutToBeClosed(tabIndex)) {
            String    title     = tabPane.getTitleAt(tabIndex);
            Component component = tabPane.getComponentAt(tabIndex);

            tabPane.removeTabAt(tabIndex);

            if (tabCloseListener != null) {
                tabCloseListener.tabClosed(title, component);
            }
        }
    }
1074598
function () {
            this.cleanCache();

            var mapping = this.__delegateMapping;
            if (mapping) {

                for (var id in mapping) {
                    if (mapping.hasOwnProperty(id)) {
                        this.remove(id);
                    }
                }

                var body = Aria.$window.document.body;
                var utilEvent = ariaUtilsEvent, index, l;
                for (index = 0, l = this.delegatedOnBody.length; index < l; index++) {
                    utilEvent.removeListener(body, this.delegatedOnBody[index], {
                        fn : this.delegate
                    });
                }
                for (index = 0, l = this.delegatedOnWindow.length; index < l; index++) {
                    utilEvent.removeListener(this.rootListener, this.delegatedOnWindow[index], {
                        fn : this.delegate
                    });
                }
                this.__delegateMapping = null;

                // do this after removing listeners as we need it to remove listeners:
                this.rootListener = null;

                // nullify dom reference
                this._focusTracking = null;

                ariaUtilsAriaWindow.detachWindow();
            }
        }
988510
@Deprecated
    public static void finalizeForDeletion(UIComponent component)
    {
        // remove any existing marks of deletion
        component.getAttributes().remove(MARK_DELETED);

        // finally remove any children marked as deleted
        if (component.getChildCount() > 0)
        {
            for (Iterator<UIComponent> iter = component.getChildren().iterator(); iter.hasNext();)
            {
                UIComponent child = iter.next();
                if (child.getAttributes().containsKey(MARK_DELETED))
                {
                    iter.remove();
                }
            }
        }

        // remove any facets marked as deleted
        if (component.getFacetCount() > 0)
        {
            Map<String, UIComponent> facets = component.getFacets();
            Collection<UIComponent> col = facets.values();
            for (Iterator<UIComponent> itr = col.iterator(); itr.hasNext();)
            {
                UIComponent fc = itr.next();
                if (fc.getAttributes().containsKey(MARK_DELETED))
                {
                    itr.remove();
                }
            }
        }
    }
953282
public void removeAll() {
        int size = size();
        if (size == 0) {
            return;
        }
        for (int i = 0, listSize = lists.size(); i < listSize; i++) {
            List<? extends T> list = lists.get(i);
            if (list instanceof ObservableList) {
                ((ObservableList) list).removeOnListChangedCallback(callback);
            }
        }
        lists.clear();
        modCount += 1;
        listeners.notifyRemoved(this, 0, size);
    }