Returns true if this Hashtable contains the specified object as the value of at least one of the key/value pairs. @param value the object to look for as a value in this Hashtable. @return true if object is a value in this Hashtable, false o
(Object value)
| 342 | * @see java.lang.Object#equals |
| 343 | */ |
| 344 | public synchronized boolean contains(Object value) { |
| 345 | if (value == null) { |
| 346 | throw new NullPointerException(); |
| 347 | } |
| 348 | |
| 349 | for (int i = elementData.length; --i >= 0;) { |
| 350 | Entry<K, V> entry = elementData[i]; |
| 351 | while (entry != null) { |
| 352 | if (entry.value.equals(value)) { |
| 353 | return true; |
| 354 | } |
| 355 | entry = entry.next; |
| 356 | } |
| 357 | } |
| 358 | return false; |
| 359 | } |
| 360 | |
| 361 | /** |
| 362 | * Returns true if this {@code Hashtable} contains the specified object as a |
no test coverage detected