Is there no item in the collection?

assert [1,2,3].is_empty  == false
assert [1..1[.is_empty   == true

Property definitions

core $ Collection :: is_empty
	# Is there no item in the collection?
	#
	#     assert [1,2,3].is_empty  == false
	#     assert [1..1[.is_empty   == true
	fun is_empty: Bool do return length == 0
lib/core/collection/abstract_collection.nit:63,2--67,41

core $ Range :: is_empty
	#     assert not [1..10[.is_empty
	#     assert not [1..1].is_empty
	#     assert [1..-10].is_empty
	redef fun is_empty do return first >= after
lib/core/collection/range.nit:76,2--79,44

pthreads $ ConcurrentCollection :: is_empty
	redef fun is_empty
	do
		mutex.lock
		var r = real_collection.is_empty
		mutex.unlock
		return r
	end
lib/pthreads/concurrent_collections.nit:124,2--130,4

core $ Ref :: is_empty
	redef fun is_empty do return false
lib/core/collection/abstract_collection.nit:360,2--35

core $ AbstractArrayRead :: is_empty
	redef fun is_empty do return _length == 0
lib/core/collection/array.nit:28,2--42

core $ ArrayMapKeys :: is_empty
	redef fun is_empty do return self.map.is_empty
lib/core/collection/array.nit:810,2--47

core $ ArrayMapValues :: is_empty
	redef fun is_empty do return self.map.is_empty
lib/core/collection/array.nit:827,2--47

core $ HashMapKeys :: is_empty
	redef fun is_empty do return self.map.is_empty
lib/core/collection/hash_collection.nit:294,2--47

core $ HashMapValues :: is_empty
	redef fun is_empty do return self.map.is_empty
lib/core/collection/hash_collection.nit:343,2--47

core $ StringCharView :: is_empty
	redef fun is_empty do return target.is_empty
lib/core/text/abstract_text.nit:1454,2--45

core $ StringByteView :: is_empty
	redef fun is_empty do return target.is_empty
lib/core/text/abstract_text.nit:1472,2--45

nitcc_runtime $ NProdChildren :: is_empty
	redef fun is_empty do return prod.number_of_children == 0
lib/nitcc_runtime/nitcc_runtime.nit:579,2--58

ordered_tree $ OrderedTree :: is_empty
	#     var tree = new OrderedTree[Int]
	#     assert tree.is_empty
	#     tree.add(null, 1)
	#     assert not tree.is_empty
	redef fun is_empty: Bool do return roots.is_empty
lib/ordered_tree/ordered_tree.nit:223,2--227,50

core $ ProxyQueue :: is_empty
	redef fun is_empty do return seq.is_empty
lib/core/queue.nit:145,2--42

core $ RandQueue :: is_empty
	redef fun is_empty do return seq.is_empty
lib/core/queue.nit:203,2--42

core $ MinHeap :: is_empty
	redef fun is_empty do return items.is_empty
lib/core/queue.nit:238,2--44

geometry $ QuadTree :: is_empty
	redef fun is_empty
	do
		if is_leaf then return data.is_empty

		assert children.length >= 4
		return data.is_empty and children[0].is_empty and children[1].is_empty and children[2].is_empty and children[3].is_empty
	end
lib/geometry/quadtree.nit:103,2--109,4

core $ ArraySet :: is_empty
	redef fun is_empty do return _array.is_empty
lib/core/collection/array.nit:604,2--45

core $ List :: is_empty
	# O(1)
	redef fun is_empty do return _head == null
lib/core/collection/list.nit:42,2--43,43

dummy_array $ DummyArray :: is_empty
	redef fun is_empty: Bool
	do
		return not (_length > 0)
	end
lib/dummy_array/dummy_array.nit:62,2--65,4

core $ HashSet :: is_empty
	redef fun is_empty do return _the_length == 0
lib/core/collection/hash_collection.nit:434,2--46

core $ Bytes :: is_empty
	redef fun is_empty do return length == 0
lib/core/bytes.nit:271,2--41

pthreads $ ConcurrentList :: is_empty
	redef fun is_empty
	do
		mutex.lock
		var r = real_collection.is_empty
		mutex.unlock
		return r
	end
lib/pthreads/concurrent_collections.nit:489,2--495,4

pthreads $ BlockingQueue :: is_empty
	redef fun is_empty do
		mutex.lock
		var r = real_collection.is_empty
		mutex.unlock
		return r
	end
lib/pthreads/concurrent_collections.nit:585,2--590,4

pthreads $ ReverseBlockingQueue :: is_empty
	# Wait until the Queue is empty
	redef fun is_empty do
		mutex.lock
		while not real_collection.is_empty do self.cond.wait(mutex)
		mutex.unlock
		return true
	end
lib/pthreads/concurrent_collections.nit:542,2--548,4

actors $ Mailbox :: is_empty
	redef fun is_empty do
		mutex.lock
		var r = real_collection.is_empty
		mutex.unlock
		return r
	end
lib/actors/actors.nit:112,2--117,4