开发者

Is there a more formal term or name for a dictionary of lists?

For documentation purposes, I'm looking for a canonical or standard name for this simple data structure. It seems like there should be one, but Google and my memory are failing me.

Here's an example in JSON-style notation:

 {
     drummers: ['Ringo Starr', 'Danny Carey', 'Keith Moon'],
     singers: ['Chris Cornell', 'Peter Gabriel'],
     guitarists: ['Stevie Ray Vaughan', 'Slash'],
     cowbell_开发者_StackOverflow社区players: [],
     bassists: ['Flea']
 }


A multimap, perhaps?

A multimap (sometimes also multihash) is a generalization of a map or associative array abstract data type in which more than one value may be associated with and returned for a given key. (snip) Often the multimap is implemented as a map with lists or sets as the map values.


In general, it it is a map, mapping a key to a list. Dictionary is appropiate as well, Hashtable wouldn't be as Hashtable connotates an implementation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜