poset: add lookup services in Map to search using keys inhierarchies.
authorJean Privat <jean@pryen.org>
Thu, 15 Jun 2017 19:37:18 +0000 (15:37 -0400)
committerJean Privat <jean@pryen.org>
Thu, 15 Jun 2017 20:48:14 +0000 (16:48 -0400)
commite430c56ed1b7cd369a7a0fefe1f99608f993dd36
treee4220f68b27387d1154e1932cc60ebbaad456299
parentb2f6af21e208f31b2319f107c0c66f4580966787
poset: add lookup services in Map to search using keys inhierarchies.

3 main methods:

* `Map::lookup_all_values` collect all values of the greaters of an element
* `Map::lookup_values` collect only the values of the most specific greaters of an element
* `MultiHashMap::lookup_joined_values` collect and join the values of the most specific greaters of an element

Since many models entities in nitc are in some poset, these services could be used
to add and retrieve metadata while automatically taking in account inheritance or importation.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/more_collections.nit
lib/poset.nit