| 412 | /// @return the value of the mapping with the specified key, or `null` |
| 413 | /// if no mapping for the specified key is found. |
| 414 | public V get(Object key) { |
| 415 | Iterator<Map.Entry<K, V>> it = entrySet().iterator(); |
| 416 | if (key != null) { |
| 417 | while (it.hasNext()) { |
| 418 | Map.Entry<K, V> entry = it.next(); |
| 419 | if (key.equals(entry.getKey())) { |
| 420 | return entry.getValue(); |
| 421 | } |
| 422 | } |
| 423 | } else { |
| 424 | while (it.hasNext()) { |
| 425 | Map.Entry<K, V> entry = it.next(); |
| 426 | if (entry.getKey() == null) { |
| 427 | return entry.getValue(); |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | return null; |
| 432 | } |
| 433 | |
| 434 | /// Returns the hash code for this object. Objects which are equal must |
| 435 | /// return the same value for this method. |