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.
()
| 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 |