deletes all current selected items

@return a list of the IItem elements which were deleted
766748
public List<Item> deleteAllSelectedItems() {
        List<Item> deletedItems = new ArrayList<>();

        final List<Integer> positions = new ArrayList<>();
        mFastAdapter.recursive(new AdapterPredicate<Item>() {
            @Override
            public boolean apply(@NonNull IAdapter<Item> lastParentAdapter, int lastParentPosition, Item item, int position) {
                if (item.isSelected()) {
                    //if it's a subitem remove it from the parent
                    if (item instanceof ISubItem) {
                        //a sub item which is not in the list can be instantly deleted
                        IExpandable parent = (IExpandable) ((ISubItem) item).getParent();
                        //parent should not be null, but check in any case..
                        if (parent != null) {
                            parent.getSubItems().remove(item);
                        }
                    }
                    if (position != -1) {
                        //a normal displayed item can only be deleted afterwards
                        positions.add(position);
                    }
                }
                return false;
            }
        }, false);

        //we have to re-fetch the selections array again and again as the position will change after one item is deleted
        for (int i = positions.size() - 1; i >= 0; i--) {
            FastAdapter.RelativeInfo<Item> ri = mFastAdapter.getRelativeInfo(positions.get(i));
            if (ri.item != null && ri.item.isSelected()) { //double verify
                if (ri.adapter != null && ri.adapter instanceof IItemAdapter) {
                    ((IItemAdapter) ri.adapter).remove(positions.get(i));
                }
            }
        }
        return deletedItems;
    }
678865
def clear_selection
      return if @selected_indices.nil? || @selected_indices.empty?
      @selected_indices = []
      @selected_index = nil
      @old_selected_index = nil
      # Not sure what event type I should give, DELETE or a new one, user should
      #  understand that selection has been cleared, and ignore first two params
      lse = ListSelectionEvent.new(0, @list.size, self, :CLEAR)
      fire_handler :LIST_SELECTION_EVENT, lse
      @repaint_required = true
      @widget_scrolled = true # FIXME we need a better name
    end
1243110
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <IIndexerWorkItem> stop ()
  {
    // don't take any more actions
    m_aImmediateCollector.stopQueuingNewObjects ();

    // Get all remaining objects and save them for late reuse
    final ICommonsList <IIndexerWorkItem> aRemainingItems = m_aImmediateCollector.drainQueue ();

    // Shutdown the thread pool afterwards
    ExecutorServiceHelper.shutdownAndWaitUntilAllTasksAreFinished (m_aSenderThreadPool);

    return aRemainingItems;
  }
528532
public java.util.List<String> getTagsToDelete() {
        if (tagsToDelete == null) {
            tagsToDelete = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return tagsToDelete;
    }
105893
synchronized List<AllocatedSlice> removeAllAllocatedSlices() {

		final List<AllocatedSlice> slices = new ArrayList<AllocatedSlice>(this.allocatedSlices.values());
		final Iterator<AllocatedSlice> it = slices.iterator();
		while (it.hasNext()) {
			removeAllocatedSlice(it.next().getAllocationID());
		}

		return slices;
	}
545588
public List<Option> getItems() {
        List<Option> selectedItems = new ArrayList<>(0);
        NodeList<OptionElement> items = selectElement.getOptions();
        for (int i = 0; i < items.getLength(); i++) {
            OptionElement item = items.getItem(i);
            Option option = itemMap.get(item);
            if (option != null)
                selectedItems.add(option);
        }
        return selectedItems;
    }
932947
public ModelAdapter<?, Item> clear() {
        if (mOriginalItems != null) {
            mOriginalItems.clear();
            publishResults(mConstraint, performFiltering(mConstraint));
            return mItemAdapter;
        } else {
            return mItemAdapter.clear();
        }
    }
819903
public void clear() {
        List<?> items = getChildren();
        
        for (int i = items.size() - 1; i >= 0; i--) {
            if (items.get(i) != customItem) {
                items.remove(i);
            }
        }
    }
1063313
public List<Option> getSelectedItems() {
        final List<Option> items = new ArrayList<>(0);
        for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
            Option opt = entry.getValue();
            if (opt.isSelected())
                items.add(opt);
        }
        return items;
    }
561461
public java.util.List<String> getRemoveSubnetIds() {
        if (removeSubnetIds == null) {
            removeSubnetIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return removeSubnetIds;
    }
695947
public DrawerView clearItems() {
        for (DrawerItem item : mAdapter.getItems()) {
            item.detach();
        }
        mAdapter.clear();
        updateList();
        return this;
    }
573327
def unselect_all(self):
        
        items = self._get_selected_items()
        with self._suppress_selection_events():
            self._selection.clear()
        self.queue_draw_item(*items)
        self.emit('selection-changed', self._get_selected_items())
788458
public List<MenuItemSelectable> getSelectedMenuItems() {
		List<MenuItemSelectable> selectedItems = getComponentModel().selectedMenuItems;
		if (selectedItems == null || selectedItems.isEmpty()) {
			return Collections.emptyList();
		} else {
			return Collections.unmodifiableList(selectedItems);
		}
	}
1215005
public List<AstNode> removeAllChildren() {
        if (this.children.isEmpty()) {
            return new ArrayList<AstNode>(0);
        }
        List<AstNode> copyOfChildren = new ArrayList<AstNode>(this.children);
        for (Iterator<AstNode> childIter = this.children.iterator(); childIter.hasNext();) {
            AstNode child = childIter.next();
            childIter.remove();
            child.parent = null;
        }
        return copyOfChildren;
    }
1151575
@Pure
	public List<Object> getCurrentValues() {
		if (this.allValues == null) {
			return Collections.emptyList();
		}
		return Collections.unmodifiableList(this.allValues);
	}
592640
public Set<Item> getSelectedItems() {
        if (mOriginalItems != null) {
            Set<Item> selections = new HashSet<>();
            for (int i = 0, size = mOriginalItems.size(); i < size; i++) {
                Item item = mOriginalItems.get(i);
                if (item.isSelected()) {
                    selections.add(item);
                }
            }
            return selections;
        } else {
            return mItemAdapter.getFastAdapter().getSelectedItems();
        }
    }
1311800
public T remove() {
        final Node<T> previous = iterator.currentNode.previous;
        final T element = remove(iterator.currentNode);
        iterator.currentNode = previous;
        return element;
    }