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

Method hashCode

lib/java/nio/DoubleBuffer.java:343–353  ·  view source on GitHub ↗

Calculates this buffer's hash code from the remaining chars. The position, limit, capacity and mark don't affect the hash code. @return the hash code calculated from the remaining chars.

()

Source from the content-addressed store, hash-verified

341 * @return the hash code calculated from the remaining chars.
342 */
343 @Override
344 public int hashCode() {
345 int myPosition = position;
346 int hash = 0;
347 long l;
348 while (myPosition < limit) {
349 l = Double.doubleToLongBits(get(myPosition++));
350 hash = hash + ((int) l) ^ ((int) (l >> 32));
351 }
352 return hash;
353 }
354
355 /**
356 * Indicates whether this buffer is direct. A direct buffer will try its

Callers

nothing calls this directly

Calls 2

doubleToLongBitsMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected