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

Method hashCode

vm/JavaAPI/src/java/util/AbstractList.java:522–531  ·  view source on GitHub ↗

Returns the hash code of this list. The hash code is calculated by taking each element's hashcode into account. @return the hash code. @see #equals @see List#hashCode()

()

Source from the content-addressed store, hash-verified

520 * @see List#hashCode()
521 */
522 @Override
523 public int hashCode() {
524 int result = 1;
525 Iterator<?> it = iterator();
526 while (it.hasNext()) {
527 Object object = it.next();
528 result = (31 * result) + (object == null ? 0 : object.hashCode());
529 }
530 return result;
531 }
532
533 /**
534 * Searches this list for the specified object and returns the index of the

Callers

nothing calls this directly

Calls 4

iteratorMethod · 0.95
hashCodeMethod · 0.95
hasNextMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected