15 |
|
import java.util.AbstractMap; |
16 |
|
import java.util.Arrays; |
17 |
|
import java.util.Collection; |
18 |
– |
import java.util.Comparator; |
18 |
|
import java.util.ConcurrentModificationException; |
19 |
|
import java.util.Enumeration; |
20 |
|
import java.util.HashMap; |
114 |
|
* objects do not support method {@code setValue}. |
115 |
|
* |
116 |
|
* <ul> |
117 |
< |
* <li> forEach: Perform a given action on each element. |
117 |
> |
* <li>forEach: Perform a given action on each element. |
118 |
|
* A variant form applies a given transformation on each element |
119 |
< |
* before performing the action.</li> |
119 |
> |
* before performing the action. |
120 |
|
* |
121 |
< |
* <li> search: Return the first available non-null result of |
121 |
> |
* <li>search: Return the first available non-null result of |
122 |
|
* applying a given function on each element; skipping further |
123 |
< |
* search when a result is found.</li> |
123 |
> |
* search when a result is found. |
124 |
|
* |
125 |
< |
* <li> reduce: Accumulate each element. The supplied reduction |
125 |
> |
* <li>reduce: Accumulate each element. The supplied reduction |
126 |
|
* function cannot rely on ordering (more formally, it should be |
127 |
|
* both associative and commutative). There are five variants: |
128 |
|
* |
129 |
|
* <ul> |
130 |
|
* |
131 |
< |
* <li> Plain reductions. (There is not a form of this method for |
131 |
> |
* <li>Plain reductions. (There is not a form of this method for |
132 |
|
* (key, value) function arguments since there is no corresponding |
133 |
< |
* return type.)</li> |
133 |
> |
* return type.) |
134 |
|
* |
135 |
< |
* <li> Mapped reductions that accumulate the results of a given |
136 |
< |
* function applied to each element.</li> |
135 |
> |
* <li>Mapped reductions that accumulate the results of a given |
136 |
> |
* function applied to each element. |
137 |
|
* |
138 |
< |
* <li> Reductions to scalar doubles, longs, and ints, using a |
139 |
< |
* given basis value.</li> |
138 |
> |
* <li>Reductions to scalar doubles, longs, and ints, using a |
139 |
> |
* given basis value. |
140 |
|
* |
141 |
|
* </ul> |
143 |
– |
* </li> |
142 |
|
* </ul> |
143 |
|
* |
144 |
|
* <p>These bulk operations accept a {@code parallelismThreshold} |
487 |
|
* |
488 |
|
* Maintaining API and serialization compatibility with previous |
489 |
|
* versions of this class introduces several oddities. Mainly: We |
490 |
< |
* leave untouched but unused constructor arguments refering to |
490 |
> |
* leave untouched but unused constructor arguments referring to |
491 |
|
* concurrencyLevel. We accept a loadFactor constructor argument, |
492 |
|
* but apply it only to initial table capacity (which is the only |
493 |
|
* time that we can guarantee to honor it.) We also declare an |
636 |
|
this.next = next; |
637 |
|
} |
638 |
|
|
639 |
< |
public final K getKey() { return key; } |
640 |
< |
public final V getValue() { return val; } |
641 |
< |
public final int hashCode() { return key.hashCode() ^ val.hashCode(); } |
642 |
< |
public final String toString(){ return key + "=" + val; } |
639 |
> |
public final K getKey() { return key; } |
640 |
> |
public final V getValue() { return val; } |
641 |
> |
public final int hashCode() { return key.hashCode() ^ val.hashCode(); } |
642 |
> |
public final String toString() { return key + "=" + val; } |
643 |
|
public final V setValue(V value) { |
644 |
|
throw new UnsupportedOperationException(); |
645 |
|
} |