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

Method hashCode

lib/java/nio/ShortBuffer.java:334–342  ·  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 shorts.

()

Source from the content-addressed store, hash-verified

332 * @return the hash code calculated from the remaining shorts.
333 */
334 @Override
335 public int hashCode() {
336 int myPosition = position;
337 int hash = 0;
338 while (myPosition < limit) {
339 hash = hash + get(myPosition++);
340 }
341 return hash;
342 }
343
344 /**
345 * Indicates whether this buffer is direct. A direct buffer will try its

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected