Number of items in the collection.

var x = new HashMap[String, Int]
assert x.length  == 0
x["four"] = 4
assert x.length  == 1
x["five"] = 5
assert x.length  == 2

Property definitions

core $ MapRead :: length
	# Number of items in the collection.
	#
	#     var x = new HashMap[String, Int]
	#     assert x.length  == 0
	#     x["four"] = 4
	#     assert x.length  == 1
	#     x["five"] = 5
	#     assert x.length  == 2
	fun length: Int is abstract
lib/core/collection/abstract_collection.nit:623,2--631,28

counter $ Counter :: length
	redef fun length do return map.length
lib/counter/counter.nit:74,2--38

core $ HashMap :: length
	redef fun length do return _the_length
lib/core/collection/hash_collection.nit:248,2--39

trees $ BinTreeMap :: length
	# O(n)
	#
	#     var tree = new BinTreeMap[Int, String]
	#     assert tree.length == 0
	#     for i in [4, 2, 1, 5, 3] do tree[i] = "n{i}"
	#     assert tree.length == 5
	redef fun length do return len
lib/trees/bintree.nit:358,2--364,31

core $ ArrayMap :: length
	# O(1)
	redef fun length do return _items.length
lib/core/collection/array.nit:719,2--720,41