erlichmen/radix-tree-objc — pull request #1 by ioliverm (2014-10-01 15:07:37+00:00)
Title: Support for multiple values under each node of the tree.

I added support to store multiple values under each node of the tree. The tree's interface remains the same, but now, adding a value using a key that already exists in the tree, adds this value to the node rather than replacing the currently stored in it.

Behavior changes in the following methods:

-(BOOL) insert:(NSString*)key value:value;

As I said, if the node with the key "key" exists, the value is added to this node, maintaining previous values stored in it.

-(id) find:(NSString*)key;

Now, this method can return an array of objects which are stored under the node that matches the key. If there's only a single value under this node, this method returns this object (not an array with a single object), so the previous behavior is maintained.

-(NSArray*)searchPrefix:(NSString *)prefix recordLimit:(int)maxLimit;

Now, this method can add to the results more than one value for each matching node.