jbee/jadamant — Issue #19: Refine concept of map factories
Author: jbee
Created: 2012-01-26 14:14:49+00:00
State: open

The basic idea: There is a interface `MapFactory` used to create map related objects like

# a empty map
# a map key
# a map entry

A map and its keys and entries are related through the order of keys and values. So all objects should be created by the same factory for one purpose. There can be different implementations for different purposes.

For example one to build a dictionary supporting a prefix lookup by sorting key alphabetically and another one for suffix lookup through reversing the keys (words).

The example also reveals that the `Map` interface needs some more refinement so that prefix lookups become possible. This could be achieved by a lookup that delivers the first entry after (greater than) a prefix. The prefix itself is created by appending the highest unicode char to the searched prefix term.