From 786de5288e98c9bcf9ffc721e3ab60c0b50c23aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Thu, 18 Dec 2014 10:31:56 -0500 Subject: [PATCH] lib/map: add factory to Map returning a HashMap MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/standard/collection/hash_collection.nit | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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] -- 1.7.9.5