Re: equals subclass

Isaac Gouy <[email protected]>
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
Clarification: Seems that there isn't a way to write those equals
methods within a class body, as that would be 
   equals(Point p1, #Point p2)
rather than
   equals(#Point p1, #Point p2)

Have I got that right?

   class Point {
      double _x = 0.0;
      double _y = 0.0;

      double x() = _x;
      double y() = _y;

      equals(#Point p2) = (_x==p2.x) && (_y==p2.y);
   }

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.