From: Alexis Laferrière Date: Thu, 18 Dec 2014 15:31:56 +0000 (-0500) Subject: lib/map: add factory to Map returning a HashMap X-Git-Tag: v0.7.1~32^2~1 X-Git-Url: http://nitlanguage.org lib/map: add factory to Map returning a HashMap Signed-off-by: Alexis Laferrière --- diff --git a/lib/standard/collection/hash_collection.nit b/lib/standard/collection/hash_collection.nit index cae46fd..f3857293 100644 --- a/lib/standard/collection/hash_collection.nit +++ b/lib/standard/collection/hash_collection.nit @@ -10,11 +10,16 @@ # You are allowed to redistribute it and sell it, alone or is a part of # another product. -# Introduce Hashmap and Hashset. +# Introduce `HashMap` and `HashSet`. module hash_collection import array +redef class Map[K, V] + # Get a `HashMap[K, V]` as default implementation + new do return new HashMap[K, V] +end + # A HashCollection is an array of HashNode[K] indexed by the K hash value private abstract class HashCollection[K] type N: HashNode[K]