Delete an element

@param n
a handle to the element
354649
private void delete(ReflectedHandle<K, V> n) {
        if (n.inner == null && free != n) {
            throw new IllegalArgumentException("Invalid handle!");
        }

        if (free == n) {
            free = null;
        } else {
            // delete from inner queue
            AddressableHeap.Handle<K, HandleMap<K, V>> nInner = n.inner;
            ReflectedHandle<K, V> nOuter = nInner.getValue().outer;
            nInner.delete();
            nOuter.inner = null;
            nOuter.minNotMax = false;

            // delete pair from inner queue
            AddressableHeap.Handle<K, HandleMap<K, V>> otherInner = nInner.getValue().otherInner;
            ReflectedHandle<K, V> otherOuter = otherInner.getValue().outer;
            otherInner.delete();
            otherOuter.inner = null;
            otherOuter.minNotMax = false;

            // reinsert either as free or as pair with free
            if (free == null) {
                free = otherOuter;
            } else {
                insertPair(otherOuter, free);
                free = null;
            }
        }
        size--;
    }
632492
public void delete(int key) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);

        if (i >= 0) {
            System.arraycopy(mKeys, i + 1, mKeys, i, mSize - (i + 1));
            System.arraycopy(mValues, i + 1, mValues, i, mSize - (i + 1));
            mSize--;
        }
    }
1372927
public static void removeChildrenFrom(final Element element) {
        if (element != null) {
            while (element.getFirstChild() != null) {
                element.removeChild(element.getFirstChild());
            }
        }
    }
753516
public static void delete(String filename) {
		File file = new File(filename);
		if(file.exists()){
			file.delete();
		}
	}
437271
public void removeNode(N node)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.remove(node);
        if(p == null)
            return;
        //Outgoing edges we can ignore removint he node drops them. We need to avoid dangling incoming edges to this node we have removed
        HashSet<N> incomingNodes = p.getIncoming();
        for(N incomingNode : incomingNodes)
            nodes.get(incomingNode).getOutgoing().remove(node);
    }
672263
def delete_node(manager, handle_id):
    
    q = """
        MATCH (n:Node {handle_id: {handle_id}})
        OPTIONAL MATCH (n)-[r]-()
        DELETE n,r
        """
    with manager.session as s:
        s.run(q, {'handle_id': handle_id})
    return True
1054552
@Override
  public void remove() {
    Assert.state(nextCalled.compareAndSet(true, false), "next was not called before remove");
    int iteratorIndexForRemove = (currentIteratorIndex - 1);
    iteratorIndexForRemove = (iteratorIndexForRemove < 0 ? iteratorList.size() - 1 : iteratorIndexForRemove);
    iteratorList.get(iteratorIndexForRemove).remove();
  }
778761
@Override
    public void remove(long key, T element) {
    	if (first.value == key && ObjectUtil.equalsOrNull(element, first.element)) {
    		removeMin();
    		return;
    	}
    	if (last.value == key && ObjectUtil.equalsOrNull(element, last.element)) {
    		removeMax();
    		return;
    	}
    	
    	// if both children of root are black, set root to red
    	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
            root.red = true;

        root = remove(root, key, element);
        if (root != null) root.red = false;
    }
1000206
private void delete(RootListNode<K, V> n) {
        RootListNode<K, V> nPrev = n.prev;

        if (nPrev != null) {
            nPrev.next = n.next;
        } else {
            rootList.head = n.next;
        }

        if (n.next != null) {
            n.next.prev = nPrev;
        } else {
            rootList.tail = nPrev;
        }

        n.prev = null;
        n.next = null;
    }
1313964
void setDelete(
    GBSNode      deleteNode,
    int          deleteIndex)
  {
    _deleteNode  = deleteNode;
    _deleteIndex = deleteIndex;
    _notFound = false;
  }
136951
public static void removeName(Node n) {
    checkState(n.isFunction() || n.isClass());
    Node originalName = n.getFirstChild();
    Node emptyName = n.isFunction() ? IR.name("") : IR.empty();
    n.replaceChild(originalName, emptyName.useSourceInfoFrom(originalName));
  }
851760
def _delete_handler(self, handler_class):
        """"""
        to_remove = self._get_handler(handler_class)
        if not to_remove:
            logging.warning('Error we should have an element to remove')
        else:
            self.handlers.remove(to_remove)
            self.logger.removeHandler(to_remove)
179157
public void removeNode(Node n)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!");

    this.removeElement(n);
  }
829743
@Override
    public E remove(int index) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Object[] elements = getArray();
            int len = elements.length;
            E oldValue = get(elements, index);
            int numMoved = len - index - 1;
            if (numMoved == 0)
                setArray(Arrays.copyOf(elements, len - 1));
            else {
                Object[] newElements = new Object[len - 1];
                System.arraycopy(elements, 0, newElements, 0, index);
                System.arraycopy(elements, index + 1, newElements, index,
                                 numMoved);
                setArray(newElements);
            }
            return oldValue;
        } finally {
            lock.unlock();
        }
    }
651481
protected void doDelete(int n) throws CorruptIndexException, IOException {
        if (transientDeletions) {
            deletedDocs.add(n);
            modCount.incrementAndGet(); // doDelete won't be executed, so incrementing modCount
        } else {
            super.doDelete(n);
            modCount.incrementAndGet();
        }
    }
1137493
public void delete(final String aBucket, final String aKey, final Handler<HttpClientResponse> aHandler) {
        createDeleteRequest(aBucket, aKey, aHandler).end();
    }
245320
public void delete ()
    {
        IntBuffer idbuf = BufferUtils.createIntBuffer(1);
        idbuf.put(_id).rewind();
        AL10.alDeleteBuffers(idbuf);
        _id = 0;
    }