MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / contains

Method contains

vm/JavaAPI/src/java/util/Hashtable.java:304–319  ·  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

302 * @see java.lang.Object#equals
303 */
304 public synchronized boolean contains(Object value) {
305 if (value == null) {
306 throw new NullPointerException();
307 }
308
309 for (int i = elementData.length; --i >= 0;) {
310 Entry<K, V> entry = elementData[i];
311 while (entry != null) {
312 if (entry.value.equals(value)) {
313 return true;
314 }
315 entry = entry.next;
316 }
317 }
318 return false;
319 }
320
321 /**
322 * Returns true if this {@code Hashtable} contains the specified object as a

Callers 3

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