On Tue, 2006-02-21 at 10:01 +0100, Tom Tromey wrote:
> >>>>> "Anthony" == Anthony Balkissoon <[EMAIL PROTECTED]> writes:
> Anthony> + public int hashCode()
> Anthony> + {
> Anthony> + //FIXME: Not sure what to do here.
> Anthony> + return super.hashCode();
> Anthony> + }
>
> Just invent some function that uses the data local to the class.Since you alrady have a equals() method it makes sense to just xor (the hashcode) of the values used in that method. that automatically makes sure that the eaulas()/hashCode() contract (equal objects have the same hashcode) is obeyed. precision ^ roundMode.hashCode() seems a good idea in this case. Cheers, Mark
signature.asc
Description: This is a digitally signed message part
