84 |
|
* class are found. |
85 |
|
*/ |
86 |
|
public void testComparableFamily() { |
87 |
< |
ConcurrentHashMap<BI, Boolean> m = new ConcurrentHashMap<>(); |
87 |
> |
ConcurrentHashMap<BI, Boolean> m = |
88 |
> |
new ConcurrentHashMap<BI, Boolean>(); |
89 |
|
for (int i = 0; i < 1000; i++) { |
90 |
|
assertTrue(m.put(new CI(i), true) == null); |
91 |
|
} |
100 |
|
* on Comparable can be inserted and found. |
101 |
|
*/ |
102 |
|
public void testGenericComparable() { |
103 |
< |
ConcurrentHashMap<Object, Boolean> m = new ConcurrentHashMap<>(); |
103 |
> |
ConcurrentHashMap<Object, Boolean> m = |
104 |
> |
new ConcurrentHashMap<Object, Boolean>(); |
105 |
|
for (int i = 0; i < 1000; i++) { |
106 |
|
BI bi = new BI(i); |
107 |
|
BS bs = new BS(String.valueOf(i)); |
124 |
|
* inserted and found. |
125 |
|
*/ |
126 |
|
public void testGenericComparable2() { |
127 |
< |
ConcurrentHashMap<Object, Boolean> m = new ConcurrentHashMap<>(); |
127 |
> |
ConcurrentHashMap<Object, Boolean> m = |
128 |
> |
new ConcurrentHashMap<Object, Boolean>(); |
129 |
|
for (int i = 0; i < 1000; i++) { |
130 |
|
m.put(new ArrayList(Collections.singleton(new BI(i))), true); |
131 |
|
} |