Вопрос

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