W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

RE: Equality tests on DOM nodes

From: Paul Butkiewicz <arabbit@earthlink.net>
Date: Fri, 11 Dec 1998 13:19:45 -0500
To: "Ray Whitmer" <ray@imall.com>, "Andrew M. Kuchling" <akuchlin@cnri.reston.va.us>
Cc: <www-dom@w3.org>, <xml-sig@python.org>
Message-ID: <000401be2532$d4647b20$da39bfa8@arabbit>

>I don't know Python, but [e]very object in Java has an equals method to
>signify deeper comparison than "==", for example, String.equals tells
>whether the contents of two strings are identical.

I must be feeling contrary today, but I think you're saying isn't true.
String.equals( String ) does examine the contents of two different objects
to determine that they are identical.  But this is the case only because
String explicitly overrides the equals( Object ) method in Object, which
isn't true of many objects.  The equals( Object ) method in Object only
returns true if the objects are actually the same object, ie.
( *x )->equals( *y ) if and only if x == y.

Received on Friday, 11 December 1998 13:18:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC