164 |
|
Iterator i = full.iterator(); |
165 |
|
int j; |
166 |
|
for (j = 0; i.hasNext(); j++) |
167 |
< |
assertEquals(j, ((Integer)i.next()).intValue()); |
167 |
> |
assertEquals(j, i.next()); |
168 |
|
assertEquals(3, j); |
169 |
|
} |
170 |
|
|
233 |
|
CopyOnWriteArraySet full = populatedSet(3); |
234 |
|
Object[] o = full.toArray(); |
235 |
|
assertEquals(3, o.length); |
236 |
< |
assertEquals(0, ((Integer)o[0]).intValue()); |
237 |
< |
assertEquals(1, ((Integer)o[1]).intValue()); |
238 |
< |
assertEquals(2, ((Integer)o[2]).intValue()); |
236 |
> |
assertEquals(0, o[0]); |
237 |
> |
assertEquals(1, o[1]); |
238 |
> |
assertEquals(2, o[2]); |
239 |
|
} |
240 |
|
|
241 |
|
/** |
247 |
|
Integer[] i = new Integer[3]; |
248 |
|
i = (Integer[])full.toArray(i); |
249 |
|
assertEquals(3, i.length); |
250 |
< |
assertEquals(0, i[0].intValue()); |
251 |
< |
assertEquals(1, i[1].intValue()); |
252 |
< |
assertEquals(2, i[2].intValue()); |
250 |
> |
assertEquals(0, (int) i[0]); |
251 |
> |
assertEquals(1, (int) i[1]); |
252 |
> |
assertEquals(2, (int) i[2]); |
253 |
|
} |
254 |
|
|
255 |
|
|