Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: equals(), Sets, Maps, and degrees of equality Date: Fri, 11 Nov 2011 14:22:22 -0800 (PST) Organization: http://groups.google.com Lines: 21 Message-ID: <16879805.1372.1321050142818.JavaMail.geo-discussion-forums@prew38> References: <24123649.762.1320892382934.JavaMail.geo-discussion-forums@vbmh5> <4407931.1762.1321025241857.JavaMail.geo-discussion-forums@prep8> <4d65ddbc-fe11-47e5-bdb1-cefca729f8f5@p5g2000vbm.googlegroups.com> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 2620:0:1000:2404:224:d7ff:fe69:5838 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1321051149 7649 127.0.0.1 (11 Nov 2011 22:39:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 11 Nov 2011 22:39:09 +0000 (UTC) In-Reply-To: <4d65ddbc-fe11-47e5-bdb1-cefca729f8f5@p5g2000vbm.googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:2404:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9860 On Friday, November 11, 2011 10:28:35 AM UTC-8, Sean Mitchell wrote: > On Nov 11, 10:27=A0am, Lew wrote: >=20 > > >> consider a class Dog: > > >> public class Dog { > > >> =A0 String breed; > > >> =A0 String name; > > >> =A0 String age; > > >> } > > >> I may want to have a Set, which holds only one Dog of each bree= d, > > > > This is terrible modeling. >=20 > Really. Why? Because you want to use 'Dog' to model 'Breed', and they aren't the same th= ing at all. --=20 Lew