Remove all occurrences of item

var a = [1,2,3,1,2,3]
a.remove_all 2
assert a == [1,3,1,3]

Property definitions

core $ RemovableCollection :: remove_all
	# Remove all occurrences of `item`
	#
	#     var a = [1,2,3,1,2,3]
	#     a.remove_all 2
	#     assert a == [1,3,1,3]
	fun remove_all(item: nullable Object) do while has(item) do remove(item)
lib/core/collection/abstract_collection.nit:415,2--420,73

core $ ArrayMapKeys :: remove_all
	redef fun remove_all(key) do self.remove(key)
lib/core/collection/array.nit:819,2--46

core $ ArrayMapValues :: remove_all
	redef fun remove_all(item)
	do
		var map = self.map
		var i = map._items.length - 1
		while i >= 0 do
			if map._items[i].second == item then
				map.remove_at_index(i)
			end
			i -= 1
		end
	end
lib/core/collection/array.nit:868,2--878,4

core $ HashMapKeys :: remove_all
	redef fun remove_all(key) do self.map.remove_node(key)
lib/core/collection/hash_collection.nit:302,2--55

core $ HashMapValues :: remove_all
	redef fun remove_all(item)
	do
		var map = self.map
		var c = map._first_item
		while c != null do
			if c._value == item then
				map.remove_node(c._key)
			end
			c = c._next_item
		end
	end
lib/core/collection/hash_collection.nit:363,2--373,4

neo4j $ NeoNodeCollection :: remove_all
	redef fun remove_all(node) do
		for n in self do
			if node == n then remove_node(n)
		end
	end
lib/neo4j/graph/graph.nit:145,2--149,4

core $ Set :: remove_all
	# Synonym of remove since there is only one item
	redef fun remove_all(item) do remove(item)
lib/core/collection/abstract_collection.nit:482,2--483,43

core $ ArraySet :: remove_all
	redef fun remove_all(item) do remove(item)
lib/core/collection/array.nit:620,2--43

core $ AbstractArray :: remove_all
	redef fun remove_all(item)
	do
		var i = index_of(item)
		while i >= 0 do
			remove_at(i)
			i = index_of_from(item, i)
		end
	end
lib/core/collection/array.nit:271,2--278,4

gamnit $ SpriteSet :: remove_all
	redef fun remove_all(e)
	do
		if not has(e) then return
		remove e
	end
lib/gamnit/flat/flat_core.nit:1004,2--1008,4

pthreads $ ConcurrentArray :: remove_all
	redef fun remove_all(e)
	do
		mutex.lock
		real_collection.remove_all(e)
		mutex.unlock
	end
lib/pthreads/concurrent_collections.nit:410,2--415,4