[sword-devel] I want to port the API to Java
Wed, 05 Dec 2001 17:48:50 -0800
Yes, internally, that's one way to do it, but there could be an API that lets it behave differently as one cohesive unit.
At 11:50 AM 12/6/2001 +1100, Chris wrote:
>Aren't we just talking about a Map containing List?
>David Burry wrote:
>>At 01:55 PM 12/5/2001 -0700, Troy A. Griffitts wrote:
>>> jsword currently requires the jgl container api. The current, standard
>>>java container library is not extensive enough to contain a multimap
>>>equivelant of the c++ stl. The primary difference between a map and
>>>multimap is that a multimap has the ability to iterate thru duplicate
>>>key values, whereas a map does not allow duplicate key values.
>>It's fairly trivial to make a multimap extension of a map, you just have to come up with some kind of packed form to encode the multi values into one value and extract them back out again, and do an extension of the API to get at the added functionality. If you need more performance than this would provide, then you could use an external library to get the multimap functionality instead of core Java stuff only, for instance Berkley DB has it and they have a Java API too.