Question

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.

Was it helpful?

Solution

create is a static method. Remove the new keyword

Multimap<String, Values> mm = HashMultimap.create();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top