Created
July 6, 2010 10:09
-
-
Save CliveEvans/465221 to your computer and use it in GitHub Desktop.
general code snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int escalated = 0, regular = 0, requeue = 0; | |
for (LanguageMessageCountType languageMessageCountType : LanguageMessageCountType.values()) { | |
switch (languageMessageCountType) { | |
case ESCALATED: | |
escalated = languageQueue.getEscalatedMessagesCount(); | |
keyValuesMap.put(languageMessageCountType.name(), String.valueOf(escalated)); | |
break; | |
case REGULAR: | |
regular = languageQueue.getRegularMessagesCount(); | |
keyValuesMap.put(languageMessageCountType.name(), String.valueOf(regular)); | |
break; | |
case REQUEUE: | |
requeue = languageQueue.getRequeuedMessagesCount(); | |
keyValuesMap.put(languageMessageCountType.name(), String.valueOf(requeue)); | |
break; | |
default: | |
break; | |
} | |
} | |
keyValuesMap.put(TOTAL.name(), String.valueOf(escalated + regular + requeue)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment