Path: csiph.com!news.redatomik.org!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder1.xsusenet.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.xdsl-87-78-189-45.netcologne.de!not-for-mail From: Patrick Roemer Newsgroups: comp.lang.java.programmer Subject: Re: double == double Date: Thu, 20 Oct 2016 15:03:05 +0200 Organization: news.netcologne.de Distribution: world Message-ID: References: <8737k0qd38.fsf@golem.phantasia.org> <87zim5es30.fsf@golem.phantasia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 20 Oct 2016 13:03:05 +0000 (UTC) Injection-Info: newsreader4.netcologne.de; posting-host="xdsl-87-78-189-45.netcologne.de:87.78.189.45"; logging-data="15129"; mail-complaints-to="abuse@netcologne.de" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100411 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 X-Mozilla-News-Host: news://news.netcologne.de In-Reply-To: Xref: csiph.com comp.lang.java.programmer:35850 Responding to 4ndre4: > On 18/10/2016 17:55, Patrick Roemer wrote: >> It should rather be: C holds a reference to another object D, and its >> methods trigger sending messages to D. > > Let's say you have a 'Person' class that holds an object of type > 'Email'. How should the class 'Email' be defined if not as something > that contains a string and methods (e.g. validation) that act on that > string? Last time I checked, Strings were objects with methods in Java, so C ~ Email, D ~ String. Validation methods don't seem to make much sense on an Email object - should be named PerhapsAnEmail, otherwise. Best regards, Patrick