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

Method equals

Ports/CLDC11/src/java/util/Vector.java:408–430  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

406 ///
407 /// - #hashCode
408 @Override
409 public synchronized boolean equals(Object object) {
410 if (this == object) {
411 return true;
412 }
413 if (object instanceof List) {
414 List<?> list = (List<?>) object;
415 if (list.size() != elementCount) {
416 return false;
417 }
418
419 int index = 0;
420 Iterator<?> it = list.iterator();
421 while (it.hasNext()) {
422 Object e1 = elementData[index++], e2 = it.next();
423 if (!(e1 == null ? e2 == null : e1.equals(e2))) {
424 return false;
425 }
426 }
427 return true;
428 }
429 return false;
430 }
431
432 /// Returns the first element in this vector.
433 ///

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected