MCPcopy Create free account
hub / github.com/davidgiven/luje / contains

Method contains

lib/java/util/Hashtable.java:344–359  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

containsValueMethod · 0.95
removeMethod · 0.95

Calls 5

getEntryMethod · 0.95
containsKeyMethod · 0.95
equalsMethod · 0.65
getKeyMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected