Remove all elements from the set and return them. Clear the entries.
432583
public List<T> pollAll() {
    List<T> retList = new ArrayList<T>(size);
    for (int i = 0; i < entries.length; i++) {
      LinkedElement<T> current = entries[i];
      while (current != null) {
        retList.add(current.element);
        current = current.next;
      }
    }
    this.clear();
    return retList;
  }
1255907
def clear(self, results=True, errors=True):
        '''
        
        '''
        if results:
            self.results = []
        if errors:
            self.errors = []
881057
@Override
   public void clear()
   {
      for (int i = 0; i < size; i++) {
         elementData[i] = null;
      }

      size = 0;
   }
211079
private void unSelectAll()
    {
        final int n = selected.size();
        for (int i = 0; i < n; i++)
        {
            selected.get(i).onSelection(false);
        }
        selected.clear();
    }
266715
@Override
    public void clear() {
        RocksIterator iterator = db.newIterator();
        while (iterator.isValid())
            try {
                db.remove(iterator.key());
            } catch (RocksDBException e) {
                throw new RuntimeException(e);
            }
        iterator.close();
        size = 0;
    }
817648
def clear(self):
        
        def clear_element():
            """
            Wrapper to clear element
            """
            return self.element.clear()
        self.execute_and_handle_webelement_exceptions(clear_element, 'clear')
        return self
1193846
def clear(self):
        
        self._filters = []
        self._order_by = OrderedDict()
        self._selects = set()
        self._negation = False
        self._attribute = None
        self._chain = None
        self._search = None

        return self
1166351
public boolean removeTerms(Set<BooleanTerm> toRemove) {
		boolean modified = false;
		if (toRemove == null || toRemove.iterator() == null) {
			modified = booleanTerms == null || size() != 0;
			booleanTerms = new HashSet<BooleanTerm>();
		} else if (booleanTerms != null) {
			modified = removeAll(toRemove);
		}
		return modified;
	}
1227268
def clear(self):
        
        self._decorations[:] = []
        try:
            self.editor.setExtraSelections(self._decorations)
        except RuntimeError:
            pass
471119
public void clear() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            for (Node<E> f = first; f != null; ) {
                f.item = null;
                Node<E> n = f.next;
                f.prev = null;
                f.next = null;
                f = n;
            }
            first = last = null;
            count = 0;
            notFull.signalAll();
        } finally {
            lock.unlock();
        }
    }
319767
def remove_all(gset, elem):
    
    n = 0
    while True:
        try:
            remove_once(gset, elem)
            n = n + 1
        except RemoveError:
            return n
1232558
def clear(self):
        
        for slot in self._slots:
            slot.grid_forget()
            slot.destroy()

        self._slots = []
71681
public final void clear() {
        for (int i = 0; i < subSets.length; i++) {
            synchronized (subSets[i]) {
                subSets[i].clear();
            } // synchronized (subSets[i]).
        }
    }
140231
public void clear() {
        for (int i = cells.size() - 1; i >= 0; i--) {
            Cell<C, T> cell = cells.get(i);
            if (cell.widget != null)
                toolkit.removeChild(table, cell.widget);
            toolkit.freeCell(cell);
        }
        cells.clear();
        rows = 0;
        columns = 0;
        if (rowDefaults != null)
            toolkit.freeCell(rowDefaults);
        rowDefaults = null;
        invalidate();
    }
1168429
public void clear() {
    int max = bits.length;
    for (int i = 0; i < max; i++) {
      bits[i] = 0;
    }
  }
45671
def clean(self, *args, **kwargs):
        """"""
        for key in list(self.store.keys()):
            self.unset(key)
18004
@VisibleForTesting
    void removeAllCacheEntries() {
        List<CacheEntry> entries;
        synchronized (this.cacheEntries) {
            entries = new ArrayList<>(this.cacheEntries.values());
            this.cacheEntries.clear();
        }

        removeFromCache(entries);
        if (entries.size() > 0) {
            log.debug("{}: Cleared all cache entries ({}).", this.traceObjectId, entries.size());
        }
    }