Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!gegeweb.org!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Enums: Properties vs. Methods Date: Tue, 29 Mar 2011 12:52:29 -0700 Organization: Canadian Mind Products Lines: 23 Message-ID: References: <2f38bb8e-9a8d-4464-ad3d-b9ce0b557219@e21g2000yqe.googlegroups.com> Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2559 On Tue, 29 Mar 2011 08:18:28 -0700 (PDT), Robert Klemme wrote, quoted or indirectly quoted someone who said : > Prop(boolean a, boolean b) { > this.a = a; > this.b = b; > } > > public boolean isA() { > return a; > } I see what you mean. You would never use custom methods when you could use getters and setters. It is a general principle you use the smallest hammer that gets the job done. Using custom methods just invites unintended divergence. -- Roedy Green Canadian Mind Products http://mindprod.com There are only two industries that refer to their customers as "users". ~ Edward Tufte