I am trying to implement a complicated data structure that looks like
Map<A,Set<B>> map = new HashMap<A,Set<B>>();
but I am not sure how to add content to this data structure. I am trying to do a
map.put(a,b);
but that doesn’t help as it expects a set. The requirement I have needs to implement this data structure. Any thoughts?
You need to
addyour element within the set contained in the hash map: