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

Method equals

Ports/CLDC11/src/java/util/AbstractList.java:492–513  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

490 ///
491 /// - #hashCode
492 @Override
493 public boolean equals(Object object) {
494 if (this == object) {
495 return true;
496 }
497 if (object instanceof List) {
498 List<?> list = (List<?>) object;
499 if (list.size() != size()) {
500 return false;
501 }
502
503 Iterator<?> it1 = iterator(), it2 = list.iterator();
504 while (it1.hasNext()) {
505 Object e1 = it1.next(), e2 = it2.next();
506 if (!(e1 == null ? e2 == null : e1.equals(e2))) {
507 return false;
508 }
509 }
510 return true;
511 }
512 return false;
513 }
514
515 /// Returns the element at the specified location in this list.
516 ///

Callers

nothing calls this directly

Calls 6

iteratorMethod · 0.95
equalsMethod · 0.95
sizeMethod · 0.65
iteratorMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected