equal
deleted
inserted
replaced
313 /** |
313 /** |
314 * A table of (int, String) sorted by decreasing int. |
314 * A table of (int, String) sorted by decreasing int. |
315 */ |
315 */ |
316 private static class Table { |
316 private static class Table { |
317 |
317 |
318 private static final Comparator<Integer> DECREASING = new Comparator<Integer>() { |
318 private static final Comparator<Integer> DECREASING = (o1, o2) -> o2.compareTo(o1); |
319 |
|
320 public int compare(Integer o1, Integer o2) { |
|
321 return o2.compareTo(o1); |
|
322 } |
|
323 }; |
|
324 private final TreeMap<Integer, Set<String>> map = new TreeMap<>(DECREASING); |
319 private final TreeMap<Integer, Set<String>> map = new TreeMap<>(DECREASING); |
325 |
320 |
326 void put(String label, int n) { |
321 void put(String label, int n) { |
327 if (n == 0) { |
322 if (n == 0) { |
328 return; |
323 return; |