item
var a = [1,2,3,1,2,3]
a.remove_all 2
assert a == [1,3,1,3]
# 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
redef fun remove_all(key) do self.remove(key)
lib/core/collection/array.nit:819,2--46
redef fun remove_all(key) do self.map.remove_node(key)
lib/core/collection/hash_collection.nit:302,2--55
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
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
# 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
redef fun remove_all(item) do remove(item)
lib/core/collection/array.nit:620,2--43
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
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
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