Create Weak Multimap with Google Collections

那年仲夏 提交于 2019-12-23 07:28:32

问题


Is there an equivalent to the nice MapMaker for MultiMaps? currently i create the cache like this:

    public static Map<Session,List<Person>> personCache = new MapMaker().weakKeys().makeMap();

the whole point of MultiMap is to avoid the nested List Values. is there any way to construct the multimap with weak keys?


回答1:


Unfortunately not. Yet. Could you file a MultimapMaker feature request in our issues db? http://google-collections.googlecode.com



来源:https://stackoverflow.com/questions/737060/create-weak-multimap-with-google-collections

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!