ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/MapWordLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/MapWordLoops.java (file contents):
Revision 1.8 by jsr166, Mon Dec 5 04:08:46 2011 UTC vs.
Revision 1.12 by jsr166, Mon Aug 10 03:13:33 2015 UTC

# Line 3 | Line 3
3   * Expert Group and released to the public domain, as explained at
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6 import java.util.*;
6   import java.io.*;
7 + import java.util.*;
8  
9   public class MapWordLoops {
10  
# Line 25 | Line 25 | public class MapWordLoops {
25      static final int numTests = 3;
26  
27      public static void main(String[] args) {
28 <        Class mapClass = null;
28 >        Class<?> mapClass = null;
29          try {
30              mapClass = Class.forName(args[0]);
31          } catch (ClassNotFoundException e) {
# Line 39 | Line 39 | public class MapWordLoops {
39  
40          for (int s = WORDS_FILES.length-1; s >= 0; --s)
41              tests(mapClass, numTests, s);
42
42      }
43  
44 <    static void tests(Class mapClass, int numTests, int sizeIndex) {
44 >    static void tests(Class<?> mapClass, int numTests, int sizeIndex) {
45          try {
46              String[] key = readWords(sizeIndex);
47              int size = key.length;
# Line 65 | Line 64 | public class MapWordLoops {
64          }
65      }
66  
67 <
69 <    static Map<String,String> newMap(Class cl) {
67 >    static Map<String,String> newMap(Class<?> cl) {
68          try {
69              Map m = (Map<String,String>)cl.newInstance();
70              return m;
# Line 127 | Line 125 | public class MapWordLoops {
125          return runTime;
126      }
127  
130
128      static class Runner implements Runnable {
129          final Map<String,String> map;
130          final String[] key;
# Line 148 | Line 145 | public class MapWordLoops {
145              rng = new LoopHelpers.SimpleRandom((id + 1) * 8862213513L);
146          }
147  
151
148          int oneStep(int j) {
149              int n = key.length;
150              int r = rng.next() & 0x7FFFFFFF;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines