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.11 by jsr166, Thu Jan 15 18:34:19 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 42 | Line 42 | public class MapWordLoops {
42  
43      }
44  
45 <    static void tests(Class mapClass, int numTests, int sizeIndex) {
45 >    static void tests(Class<?> mapClass, int numTests, int sizeIndex) {
46          try {
47              String[] key = readWords(sizeIndex);
48              int size = key.length;
# Line 65 | Line 65 | public class MapWordLoops {
65          }
66      }
67  
68 <
69 <    static Map<String,String> newMap(Class cl) {
68 >    static Map<String,String> newMap(Class<?> cl) {
69          try {
70              Map m = (Map<String,String>)cl.newInstance();
71              return m;
# Line 127 | Line 126 | public class MapWordLoops {
126          return runTime;
127      }
128  
130
129      static class Runner implements Runnable {
130          final Map<String,String> map;
131          final String[] key;
# Line 148 | Line 146 | public class MapWordLoops {
146              rng = new LoopHelpers.SimpleRandom((id + 1) * 8862213513L);
147          }
148  
151
149          int oneStep(int j) {
150              int n = key.length;
151              int r = rng.next() & 0x7FFFFFFF;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines