问题
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