문제

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