سؤال

this thing with Multimaps starts to btoher me. This is how i create the Map.

Map<String, Multimap<String,Values>> valuesMap = new HashMap<String, Multimap<String, Values>>();

then the second inner Map is this.

Multimap<String, Values> mm = new HashMultimap.create();

But after compiling I get this failure message: HashMultimap.create cannot be resolved to a type

I have all imports of guava included. What I dont understand, Intellisense recognises Hashmap but not Hashmultimap. I hope somebody can give me a tip, I am searching for hours.

هل كانت مفيدة؟

المحلول

create is a static method. Remove the new keyword

Multimap<String, Values> mm = HashMultimap.create();
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top