In java, can you initialize a new map's keyset based on the values of an existing set?
Something like:
Set<String> setOfStrings = getSetFromSomeOtherFuntion();
Map<String, Boolean> map = new Hashmap<>(setOfStrings);
If that's possible, then I would presume the value for each entry in the map is null, which is ok, but even better would be if a default value could be set (for example, false if it's Boolean).