I am trying to implement within a class I call State some sort of mapping from a String to a set of States.
So far, I have something like this as the initialization of this concept:
Map<String, HashSet<State>> mapping = new HashMap<String, HashSet<State>>();
However, when I perform something like this:
it obviously does not work because I'm not adding a HashSet to the mapping, just a member that I want to be put into the set. Would you all suggest that I create some sort of wrapper class for the HashSet or something along those lines? I need to be able to stuff distinct states into that HashSet and it's befuddling me.