At 07:46 AM 12/4/2003 +1100, you wrote:

We can add this as the first line as an optimization:

if( this == rObject) {
  return true;
}

right! I'll add this now.


Also, will the hashCode based on the timestamp be enough to be
consistent with equals?

Yes. The general contact for the hashcode method says:


1 Two equal objects must have the same hashcode.
2 Two unequal objects can have the same hashcode.

Item 1 does *not* mean that unequal objects must have different hashcodes, which is actually impossible to achieve.

Does this answer the question?

cheers,

Paul

-- Ceki Gülcü

For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to