framework/tests/all-systems/MissingBoundAnnotations.java
raw| 1 | import java.util.ArrayList; |
| 2 | import java.util.Collection; |
| 3 | import java.util.Collections; |
| 4 | import java.util.Map; |
| 5 | |
| 6 | public final class MissingBoundAnnotations { |
| 7 | @SuppressWarnings("nullness:type.argument.type.incompatible") |
| 8 | public static <K extends Comparable<? super K>, V> Collection<K> sortedKeySet(Map<K, V> m) { |
| 9 | ArrayList<K> theKeys = new ArrayList<>(m.keySet()); |
| 10 | Collections.sort(theKeys); |
| 11 | return theKeys; |
| 12 | } |
| 13 | } |