68 |
|
* associated map using <tt>put</tt>.) |
69 |
|
* |
70 |
|
* <p>This class is a member of the |
71 |
< |
* <a href="{@docRoot}/../guide/collections/index.html"> |
71 |
> |
* <a href="{@docRoot}/../technotes/guides/collections/index.html"> |
72 |
|
* Java Collections Framework</a>. |
73 |
|
* |
74 |
|
* @param <K> the type of keys maintained by this map |
510 |
|
public V put(K key, V value) { |
511 |
|
Entry<K,V> t = root; |
512 |
|
if (t == null) { |
513 |
< |
compare(key, key); // type check |
513 |
> |
// TBD: |
514 |
> |
// 5045147: (coll) Adding null to an empty TreeSet should |
515 |
> |
// throw NullPointerException |
516 |
> |
// |
517 |
> |
// compare(key, key); // type check |
518 |
|
root = new Entry<K,V>(key, value, null); |
519 |
|
size = 1; |
520 |
|
modCount++; |