Commit 93245b0a authored by Kenix Whisperwind's avatar Kenix Whisperwind

Fixed reversed Event HashMap and added more comments

parent 1f030508
......@@ -438,8 +438,8 @@ public final class Development implements CommandListener {
List list = new LinkedList(events.entrySet());
Collections.sort(list, new Comparator() {
public int compare(Object o1, Object o2) {
return ((Comparable) ((Map.Entry) (o1)).getValue())
.compareTo(((Map.Entry) (o2)).getValue());
return ((Comparable) ((Map.Entry) (o2)).getValue())
.compareTo(((Map.Entry) (o1)).getValue());
}
});
HashMap sortedHashMap = new LinkedHashMap();
......@@ -452,7 +452,7 @@ public final class Development implements CommandListener {
int i = 0;
StringBuilder s = new StringBuilder();
for (Map.Entry<String, Integer> entry : events.entrySet()) {
if(i >= 18)
if(i >= 18) // Only display first 18 elements of the hashmap
break;
String name = entry.getKey();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment