37 |
|
* Returns a new map from Items 1-5 to Strings "A"-"E". |
38 |
|
*/ |
39 |
|
private static ConcurrentHashMap<Item,String> map5() { |
40 |
< |
ConcurrentHashMap<Item,String> map = new ConcurrentHashMap<Item,String>(5); |
40 |
> |
ConcurrentHashMap<Item,String> map = new ConcurrentHashMap<>(5); |
41 |
|
assertTrue(map.isEmpty()); |
42 |
|
map.put(one, "A"); |
43 |
|
map.put(two, "B"); |
556 |
|
|
557 |
|
static ConcurrentHashMap<Long, Long> longMap() { |
558 |
|
if (longMap == null) { |
559 |
< |
longMap = new ConcurrentHashMap<Long, Long>(SIZE); |
559 |
> |
longMap = new ConcurrentHashMap<>(SIZE); |
560 |
|
for (int i = 0; i < SIZE; ++i) |
561 |
|
longMap.put(Long.valueOf(i), Long.valueOf(2 *i)); |
562 |
|
} |