(Just setting up).
TreeMap< String, Set< String>> map;
the strings are names and the Set are different timestamps, so every timestamp can have several names, if all have chosen the same time
...
(initiating)
map = new TreeMap< String, Set< String>>;
...
for (Map.entry< String, Set< String>> mapEx : map.entrySet()){
what would map.getValue result in here? like, would the following code result in me being able to look at each string in the Set part from map and print them?
for(String stringEx : map.getValue()){
System.Out.Println(stringEx);
}
map.getValue will be Set<String>
indeed.
If you have this loop
for(String stringEx : mapEx.getValue()){
System.out.println(stringEx);
}
inside this loop
for (Map.entry< String, Set< String>> mapEx : map.entrySet()){
// For each map entry value is set
//of strings which can be printed by the loop shown before
}
Combined loops
for (Map.entry< String, Set< String>> mapEx : map.entrySet()){
for(String stringEx : mapEx.getValue()){
System.out.println(stringEx);
}
}