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

Method hashCode

lib/java/util/Hashtable.java:534–553  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

532 }
533
534 @Override
535 public synchronized int hashCode() {
536 int result = 0;
537 Iterator<Map.Entry<K, V>> it = entrySet().iterator();
538 while (it.hasNext()) {
539 Map.Entry<K, V> entry = it.next();
540 Object key = entry.getKey();
541 if (key == this) {
542 continue;
543 }
544 Object value = entry.getValue();
545 if (value == this) {
546 continue;
547 }
548 int hash = (key != null ? key.hashCode() : 0)
549 ^ (value != null ? value.hashCode() : 0);
550 result += hash;
551 }
552 return result;
553 }
554
555 /**
556 * Returns true if this {@code Hashtable} has no key/value pairs.

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