Reputation: 521
Given this hashmap:
HashMap<TitledPane, Boolean> paneMap = new HashMap<>();
I'm trying to set all values in the map to false (values are set selectively in the application after 'clearing' the map), but no matter what I have tried I cannot get an appropriate iterator which will allow me to set each boolean value. Can someone help please?
Upvotes: 1
Views: 1029
Reputation: 521
Just spoke to someone by phone and there is a very simple answer which I just didn't see in the end, because I tried to make it too complicated (I hadn't realised that 'put' replaces any existing values.
for (TitledPane p : paneMap.keySet()){
paneMap.put(p, Boolean.FALSE);
}
Upvotes: 1