MCPcopy Index your code
hub / github.com/davidgiven/luje / equals

Method equals

lib/java/util/Hashtable.java:475–495  ·  view source on GitHub ↗

Compares this Hashtable with the specified object and indicates if they are equal. In order to be equal, object must be an instance of Map and contain the same key/value pairs. @param object the object to compare with this object. @return true if the specified obj

(Object object)

Source from the content-addressed store, hash-verified

473 * @see #hashCode
474 */
475 @Override
476 public synchronized boolean equals(Object object) {
477 if (this == object) {
478 return true;
479 }
480 if (object instanceof Map) {
481 Map<?, ?> map = (Map<?, ?>) object;
482 if (size() != map.size()) {
483 return false;
484 }
485
486 Set<Map.Entry<K, V>> entries = entrySet();
487 for (Map.Entry<?, ?> e : map.entrySet()) {
488 if (!entries.contains(e)) {
489 return false;
490 }
491 }
492 return true;
493 }
494 return false;
495 }
496
497 /**
498 * Returns the value associated with the specified key in this

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.95
entrySetMethod · 0.95
sizeMethod · 0.65
entrySetMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected