[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] java.nio hashcode methods
From: |
Sven de Marothy |
Subject: |
[cp-patches] java.nio hashcode methods |
Date: |
Thu, 16 Sep 2004 14:17:46 +0200 |
Hi,
Here is a patch implementing the java.nio.*Buffer class hashCode()
methods. Although it shouldn't be necessary, I've made it
semi-compatible with the corresponding JDK hash codes.
(Done cleanly by hashing a one byte buffer, a two byte buffer
and so on. Not very hard to figure out.)
For FloatBuffer, DoubleBuffer and LongBuffer the JDK is buggy and
does not give useful hash codes. So in this case, the implementation
is not compatible. The hash function is also stated in the docs.
Ok?
/Sven
2004-09-16 Sven de Marothy <address@hidden>
* java/nio/ByteBuffer.java:
(hashCode): Implemented.
* java/nio/CharBuffer.java:
* java/nio/DoubleBuffer.java:
* java/nio/FloatBuffer.java:
* java/nio/LongBuffer.java:
* java/nio/IntBuffer.java:
* java/nio/ShortBuffer.java:
Likewise.
bufferhash.patch
Description: Text Data
- [cp-patches] java.nio hashcode methods,
Sven de Marothy <=