Copy these lists into a map with each list entry identified by the first word (the key) of the list.
将这些列表复制到一个映射且使用列表的第一个单词(键)标识每个列表条目。
You then iterate over the list from the stories with the given tag, putting each into the map using the ID of the story as the key.
然后循环遍历列表获得带有特定标记的新闻,并以每条新闻的ID为键将它们放入映射中。
You could use a List or a Map to implement the relationship; however, a Map offers the advantage that it can provide fast lookup given, say, the book catalog number as the key.
可以用List或Map实现这个关系;但是Map提供的优势是它能提供快速的查询,也就是说用图书目录编号作为键。
应用推荐