Re: Bitstrings vs Hashmap
If you are not going to know the number of pre-defined states at runtime a HashMap may be very useful. You may wish to use a HashSet rather than a Map - because it implements the Set interface (which extends Collection) it may give you more of an advantage when doing things that require a Collection (like comparisons - although HashSet uses a HashMap as its foundation, it directly implements the Set/Collection interface whereas the Map does not).
Re: Bitstrings vs Hashmap
I'm going to have to read up on the difference between a HashSet and a HashMap ... thanks!
Re: Bitstrings vs Hashmap
Here is a definition of HashSet vs HashMap:
A HashMap provides fast access to a mapping from a unique key to a value. Keys are unordered, which makes it faster than the TreeMap, where the keys are ordered. A HashSet is fast access to unique values only (there are no keys because it is not a mapping, it's just the values). HashSet values are unordered, which makes it faster than the TreeSet, where the values are ordered. (Core Java - What is the difference between hashmap and hashset?)
I guess in my case, I could just use HashSet because they're not in order, and the existance of those unique values already mean that the flag is set. Thanks!