MCPcopy Create free account
hub / github.com/davidgiven/luje / hashCode

Method hashCode

lib/java/util/AbstractList.java:521–530  ·  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

519 * @see List#hashCode()
520 */
521 @Override
522 public int hashCode() {
523 int result = 1;
524 Iterator<?> it = iterator();
525 while (it.hasNext()) {
526 Object object = it.next();
527 result = (31 * result) + (object == null ? 0 : object.hashCode());
528 }
529 return result;
530 }
531
532 /**
533 * 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