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

Method equals

Ports/CLDC11/src/java/util/Hashtable.java:458–480  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

456 ///
457 /// - #hashCode
458 @Override
459 public synchronized boolean equals(Object object) {
460 if (this == object) {
461 return true;
462 }
463 if (object instanceof Map) {
464 Map<?, ?> map = (Map<?, ?>) object;
465 if (size() != map.size()) {
466 return false;
467 }
468
469 Set<Map.Entry<K, V>> entries = entrySet();
470 Iterator it = map.entrySet().iterator();
471 while(it.hasNext()) {
472 Map.Entry<?, ?> e = (Map.Entry<?, ?>)it.next();
473 if (!entries.contains(e)) {
474 return false;
475 }
476 }
477 return true;
478 }
479 return false;
480 }
481
482 /// Returns the value associated with the specified key in this
483 /// `Hashtable`.

Callers

nothing calls this directly

Calls 8

sizeMethod · 0.95
entrySetMethod · 0.95
hasNextMethod · 0.95
nextMethod · 0.95
sizeMethod · 0.65
iteratorMethod · 0.65
entrySetMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected