Okay, I'm SURE there is a better way to do this. What I have is a nested HashMap which contains any number of K,V pairs as imported from an XML file. However for each Key in the parent HashMap, there is only 1 child K,V pair.
I'm wondering if there is a "better" way to code this than what I have.
HashMap<String, HashMap<String,String>> mQueues = Global.mQueues;
for (Map.Entry<String, HashMap<String, String>> eQueues: mQueues.entrySet()) {
// There is only 1 K,V for each key iterated above
// This is where I am wondering if there is a better way to do this. e.g. directly access the Key and Value of the subordinate HashMap
for (Map.Entry<String, String> sQueue : eQueues.getValue().entrySet()) {
strGroup = sQueue.getKey();
strPattern = sQueue.getValue();
}
if (eQueues.getKey() == "Default") {
strDefGroup = strGroup;
} else {
if (strParts[0] == strPattern) {
msg_grp = strGroup;
boolPatternMatch = true;
}
}