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

Method hashCode

Ports/CLDC11/src/java/util/Hashtable.java:524–543  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

522 }
523
524 @Override
525 public synchronized int hashCode() {
526 int result = 0;
527 Iterator<Map.Entry<K, V>> it = entrySet().iterator();
528 while (it.hasNext()) {
529 Map.Entry<K, V> entry = it.next();
530 Object key = entry.getKey();
531 if (key == this) {
532 continue;
533 }
534 Object value = entry.getValue();
535 if (value == this) {
536 continue;
537 }
538 int hash = (key != null ? key.hashCode() : 0)
539 ^ (value != null ? value.hashCode() : 0);
540 result += hash;
541 }
542 return result;
543 }
544
545 /// Returns true if this `Hashtable` has no key/value pairs.
546 ///

Callers

nothing calls this directly

Calls 7

entrySetMethod · 0.95
hashCodeMethod · 0.95
iteratorMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65

Tested by

no test coverage detected