On Fri, 2003-12-05 at 13:19, Raymond DeCampo wrote:
> Paul Smith wrote:
> >>The hashcode computation must be fast in itself, at least significantly
> >>faster than 'equals' method invocations which return false.
> >>
> >>I think that String.hashcode computation is kinda slow depending on the JDK
Paul Smith wrote:
The hashcode computation must be fast in itself, at least significantly
faster than 'equals' method invocations which return false.
I think that String.hashcode computation is kinda slow depending on the JDK
because it iterates on ALL the characters of the String.
M. Yes
> The hashcode computation must be fast in itself, at least significantly
> faster than 'equals' method invocations which return false.
>
> I think that String.hashcode computation is kinda slow depending on the JDK
> because it iterates on ALL the characters of the String.
M. Yes, I thin
At 08:02 AM 12/4/2003 +1100, Paul Smith wrote:
On Thu, 2003-12-04 at 07:54, Ceki Gülcü wrote:
> 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 o
On Thu, 2003-12-04 at 07:54, Ceki GÃlcà wrote:
> 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
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
> +
> + public boolean equals(Object rObject) {
> +
> + if(!(rObject instanceof LoggingEvent)) {
> + return false;
> + }
We can add this as the first line as an optimization:
if( this == rObject) {
return true;
}
Also, will the hashCode based on the timestam
I would suggest adding support to the pattern layout to support the logging
event properties.
Syntax like:
%P{name}
Would be sufficient.
Nicko
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 18 February 2003 19:58
> To: [EMAIL PROTECTED]
> Subject: cvs