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 bytes.
()
| 628 | * @return the hash code calculated from the remaining bytes. |
| 629 | */ |
| 630 | @Override |
| 631 | public int hashCode() { |
| 632 | int myPosition = position; |
| 633 | int hash = 0; |
| 634 | while (myPosition < limit) { |
| 635 | hash = hash + get(myPosition++); |
| 636 | } |
| 637 | return hash; |
| 638 | } |
| 639 | |
| 640 | /** |
| 641 | * Indicates whether this buffer is direct. |