Removes obsolete elements from names and shared elements.

@param names            Shared element names.
@param sharedElements   Shared elements.
@param elementsToRemove The elements that should be removed.
517053
private void removeObsoleteElements(List<String> names,
                                        Map<String, View> sharedElements,
                                        List<String> elementsToRemove) {
        if (elementsToRemove.size() > 0) {
            names.removeAll(elementsToRemove);
            for (String elementToRemove : elementsToRemove) {
                sharedElements.remove(elementToRemove);
            }
        }
    }
1216241
public <T> void clear(ElementDescriptor<T> property)
	{
		if (mSet != null)
		{
			mSet.remove(property);
		}
	}
169001
@Override public synchronized Long del(final String ... keys) {
        long deleted = 0L;
        String key;
        for (int idx = 0; idx < keys.length; idx += 1) {
            key = keys[idx];
            timers.remove(key);
            expirations.remove(key);
            for (IRedisCache cache : caches) {
                if (cache.exists(key)) {
                    cache.remove(key);
                    keyModified(key);
                    deleted += 1L;
                    break;
                }
            }
        }
        return deleted;
    }
483262
public void setIfexistsone(String elements) {

        if (elements != null) {
            m_elementlist = elements;
            m_checkall = false;
            m_checknone = false;
        }
    }
342080
public void setDeletedFaces(java.util.Collection<String> deletedFaces) {
        if (deletedFaces == null) {
            this.deletedFaces = null;
            return;
        }

        this.deletedFaces = new java.util.ArrayList<String>(deletedFaces);
    }
161392
public synchronized void removeAllElements() {
        modCount++;
        // Let gc do its work
        for (int i = 0; i < elementCount; i++)
            elementData[i] = null;

        elementCount = 0;
    }
222281
void setExistingNames(String... names) {
		this.existingNames = names;
		for (int i = 0; i < this.existingNames.length; ++i) {
			this.existingNames[i] = Strings.nullToEmpty(this.existingNames[i]);
		}
	}
311490
private void putElement(final String elemName, final Attributes atts, final boolean removeConref) throws SAXException {
        //parameter boolean removeConref specifies whether to remove
        //conref information like @conref @conaction in current element
        //when copying it to pushcontent. True means remove and false means
        //not remove.
        final Set<String> namespaces = new HashSet<>();
        try {
            pushcontentWriter.writeStartElement(elemName);
            for (int index = 0; index < atts.getLength(); index++) {
                final String name = atts.getQName(index);
                if (!removeConref ||
                        !ATTRIBUTE_NAME_CONREF.equals(name) && !ATTRIBUTE_NAME_CONACTION.equals(name)) {
                    String value = atts.getValue(index);
                    if (ATTRIBUTE_NAME_HREF.equals(name) || ATTRIBUTE_NAME_CONREF.equals(name)) {
                        // adjust href for pushbefore and replace
                        value = replaceURL(value);
                    }
                    final int offset = atts.getQName(index).indexOf(":");
                    final String prefix = offset != -1 ? atts.getQName(index).substring(0, offset) : "";
                    if (!namespaces.contains(prefix)) {
                        namespaces.add(prefix);
                        if (!prefix.isEmpty()) {
                            pushcontentWriter.writeNamespace(prefix, atts.getURI(index));
                        }
                    }
                    pushcontentWriter.writeAttribute(prefix, atts.getURI(index), atts.getLocalName(index), value);
                }
            }
            //id attribute should only be added to the starting element
            //which dosen't have id attribute set
            if (ATTR_CONACTION_VALUE_PUSHREPLACE.equals(pushType) &&
                    atts.getValue(ATTRIBUTE_NAME_ID) == null &&
                    level == 1) {
                final String fragment = target.getFragment();
                if (fragment == null) {
                    //if there is no '#' in target string, report error
                    logger.error(MessageUtils.getMessage("DOTJ041E", target.toString()).toString());
                } else {
                    String id;
                    //has element id
                    if (fragment.contains(SLASH)) {
                        id = fragment.substring(fragment.lastIndexOf(SLASH) + 1);
                    } else {
                        id = fragment;
                    }
                    //add id attribute
                    pushcontentWriter.writeAttribute(ATTRIBUTE_NAME_ID, id);
                }
            }
        } catch (final XMLStreamException e) {
            throw new SAXException(e);
        }
    }
242131
public static void removeFromParent(Element elem) {
    if(elem != null && elem.getParentNode() != null) {
      elem.getParentNode().removeChild(elem);
    }
  }
415374
public void removeElementsWithNoRelationships() {
        Set<RelationshipView> relationships = getRelationships();

        Set<String> elementIds = new HashSet<>();
        relationships.forEach(rv -> elementIds.add(rv.getRelationship().getSourceId()));
        relationships.forEach(rv -> elementIds.add(rv.getRelationship().getDestinationId()));

        for (ElementView elementView : getElements()) {
            if (!elementIds.contains(elementView.getId())) {
                removeElement(elementView.getElement());
            }
        }
    }
1235714
private void dispose(Collection<?> elements) {
        // Dispose all disposable elements
        for (Object element : elements) {
            if (element instanceof Disposable) {
                ((Disposable) element).dispose();
            }
        }

        // Clear collection
        dataProviders.clear();
    }
572937
private void removeKeys(List<Integer> keysToRemove, SparseArrayCompat<ViewHolder> headers) {
        for (Integer key : keysToRemove) {
            headers.remove(key);
        }
    }
1291902
public void referencedElementRemoved(ModelElementInstance referenceTargetElement, Object referenceIdentifier) {
    for (ModelElementInstance referenceSourceElement : findReferenceSourceElements(referenceTargetElement)) {
      if (referenceIdentifier.equals(getReferenceIdentifier(referenceSourceElement))) {
        removeReference(referenceSourceElement, referenceTargetElement);
      }
    }
  }
788586
public static void removeChildrenFrom(Element element) {
        if (element != null) {
            while (element.firstChild != null) {
                element.removeChild(element.firstChild);
            }
        }
    }
125987
private void onRemove(final String name) {
        Feedback.confirm(Console.MESSAGES.deleteTitle(title),
                Console.MESSAGES.deleteConfirm(title + " '" + name + "'"),
                isConfirmed -> {
                    if (isConfirmed) {
                        circuit.dispatch(new DeleteConfig(addressTemplate, name));
                    }
                });
    }
1151015
@SuppressWarnings({})
    public synchronized void removeStoreFromSession(List<String> storeNameToRemove) {

        logger.info("closing the Streaming session for a few stores");

        commitToVoldemort(storeNameToRemove);
        cleanupSessions(storeNameToRemove);

    }
766556
@SuppressWarnings("unchecked")
	protected void removeSREs() {
		final IStructuredSelection selection = (IStructuredSelection) this.sresList.getSelection();
		final ISREInstall[] vms = new ISREInstall[selection.size()];
		final Iterator<ISREInstall> iter = selection.iterator();
		int i = 0;
		while (iter.hasNext()) {
			vms[i] = iter.next();
			i++;
		}
		removeSREs(vms);
	}