12 |
|
|
13 |
|
public class PriorityQueueSort { |
14 |
|
|
15 |
< |
static class MyComparator implements Comparator<Integer> { |
15 |
> |
static class MyComparator implements Comparator<Integer> { |
16 |
|
public int compare(Integer x, Integer y) { |
17 |
|
int i = ((Integer)x).intValue(); |
18 |
|
int j = ((Integer)y).intValue(); |
26 |
|
int n = 100000; |
27 |
|
if (args.length > 0) |
28 |
|
n = Integer.parseInt(args[0]); |
29 |
< |
|
29 |
> |
|
30 |
|
List<Integer> sorted = new ArrayList<Integer>(n); |
31 |
|
for (int i = 0; i < n; i++) |
32 |
|
sorted.add(new Integer(i)); |
67 |
|
throw new RuntimeException("Iterator remove test failed."); |
68 |
|
} |
69 |
|
} |
70 |
– |
|