I'm trying to pass a variable of the type:
HashMap<Foo, HashSet<Bar>>
to a method, which expects:
Map<Foo, Set<Bar>>
I think it should work, but I'm getting the following compile error:
java: method setMenu in class com.xx.client.layout.Layout cannot be applied to given types;
required: java.util.Map<com.xx.shared.model.UserType,java.util.Set<com.xx.shared.dto.model.MenuItemDTO>>
found: java.util.HashMap<com.xx.shared.model.UserType,java.util.HashSet<com.xx.shared.dto.model.MenuItemDTO>>
reason: actual argument java.util.HashMap<com.xx.shared.model.UserType,java.util.HashSet<com.xx.shared.dto.model.MenuItemDTO>>
cannot be converted to
java.util.Map<com.xx.shared.model.UserType,java.util.Set<com.xx.shared.dto.model.MenuItemDTO>>
by method invocation conversion