Hmm... No problem with common usages. But may cause problem with collections.
----- Original Message ----- From: "Paulo Gaspar" <[EMAIL PROTECTED]> To: "Avalon Development" <[email protected]> Sent: Friday, September 14, 2001 10:13 PM Subject: RE: Why Version.equals( final Version other )? > > Well I like the type safety, however you could also easily implement > > But Peter, since any class inherits a method > boolean equals(Object obj) > > from Object, you still have no type safe equals() method just by > implementing > boolean equals( final Version other ) > > since any call with a non Version compatible argument can be handled > by the Object.equals() implementation. > > > Unless you use a different method name, what is the advantage of this > type-safe version? > Am I missing something? > > > Have fun, > Paulo Gaspar > > > -----Original Message----- > > From: Peter Donald [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 13, 2001 3:17 PM > > To: Avalon Development > > Subject: Re: Why Version.equals( final Version other )? > > > > > > On Thu, 13 Sep 2001 23:15, Eung-ju Park wrote: > > > Why use "boolean equals( final Version other )" > > > instead of "boolean equals( final Object other )"? > > > > Well I like the type safety, however you could also easily implement > > > > public boolean equals( final Object other ) > > { > > if( other instanceof Version ) return equals( (Version)other ); > > else return false; > > } > > > > -- > > Cheers, > > > > Pete > > > > "abandon all hope , ye who enter here" - dante, inferno > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
