Is there no item in the collection?

var x = new HashMap[String, Int]
assert x.is_empty  == true
x["four"] = 4
assert x.is_empty  == false

Property definitions

core $ MapRead :: is_empty
	# Is there no item in the collection?
	#
	#     var x = new HashMap[String, Int]
	#     assert x.is_empty  == true
	#     x["four"] = 4
	#     assert x.is_empty  == false
	fun is_empty: Bool is abstract
lib/core/collection/abstract_collection.nit:605,2--611,31

counter $ Counter :: is_empty
	redef fun is_empty do return map.is_empty
lib/counter/counter.nit:76,2--42

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

trees $ BinTreeMap :: is_empty
	# O(n) in worst case, average is O(h) with h: tree height
	#
	#     var tree = new BinTreeMap[Int, String]
	#     assert tree.is_empty
	#     tree[1] = "n1"
	#     assert not tree.is_empty
	redef fun is_empty do return root == null
lib/trees/bintree.nit:52,2--58,42

core $ ArrayMap :: is_empty
	redef fun is_empty do return _items.is_empty
lib/core/collection/array.nit:724,2--45

ini $ IniFile :: is_empty
	# Does this file contains no properties and no sections?
	#
	# ~~~
	# var ini = new IniFile.from_string("")
	# assert ini.is_empty
	#
	# ini = new IniFile.from_string("""
	# key=value
	# """)
	# assert not ini.is_empty
	#
	# ini = new IniFile.from_string("""
	# [section]
	# """)
	# assert not ini.is_empty
	# ~~~
	redef fun is_empty do return super and sections.is_empty
lib/ini/ini.nit:160,2--176,57