(Pair<Integer, Metric> o1, Pair<Integer, Metric> o2)
| 175 | Collections.sort(items, new Comparator<Pair<Integer,Metric>>() { |
| 176 | |
| 177 | @Override |
| 178 | public int compare(Pair<Integer, Metric> o1, Pair<Integer, Metric> o2) { |
| 179 | int c = Integer.compare(o1.second().bytes, o2.second().bytes); |
| 180 | if(c == 0) { |
| 181 | return o1.first().compareTo(o2.first()); |
| 182 | } else { |
| 183 | return c; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | }); |
| 188 | int total = 0; |