well I have the wrapper (it is for XidImpl) but I still need the best way to
actually *Compute* a byte[] hashCode()
for (int i =....) {
hashCode = hashCode^(new Byte(byte[i]).hashCode());
}
????????????? (I don't think that would work actually
help me out man
marc
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Schaefer, Andreas
> Sent: Thursday, August 10, 2000 5:00 PM
> To: 'jBoss Developer'
> Subject: RE: [jBoss-Dev] [newbie] byte[].hashcode()
>
>
> Hi
>
> As far as I know the byte[] super class is Object and it seems that
> they do not overwrite the standard equals() method (as they also do
> for the toString()).
> I also checked Byte[] because its superclass is Object[] but it is
> the same.
>
> I think their is no way to go around except to write a wrapper class
> around byte[], eh?
>
> Have fun
>
> Mad Andy
>
> > -----Original Message-----
> > From: marc fleury [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 10, 2000 4:50 PM
> > To: jBoss Developer
> > Subject: [jBoss-Dev] [newbie] byte[].hashcode()
> >
> >
> > did you know that
> >
> > byte[] byte1 = {1,2,3};
> > byte[] byte2 = {1,2,3};
> >
> > yields
> > byte1.equals(byte2) = false;
> > and
> > byte1.hashCode() != byte2.hashCode();
> >
> > blows my mind man....
> >
> > what is the best way to compute a byte[].hashCode()?
> >
> > regards
> >
> > marc
> >
> > sorry for the newbie question :))))
> >
> > ________________________
> > Marc Fleury
> > Chief Technology Officer
> > Telkel, Inc.
> > ________________________
> >
>
>