Message from discussion Chaining Methods and Performance.
Received: by 10.91.62.15 with SMTP id p15mr315376agk.19.1300221536240;
Tue, 15 Mar 2011 13:38:56 -0700 (PDT)
Received: by 10.91.202.30 with SMTP id e30ls2201agq.1.p; Tue, 15 Mar 2011
13:37:41 -0700 (PDT)
Received: by 10.90.18.39 with SMTP id 39mr2357agr.32.1300221461439; Tue, 15
Mar 2011 13:37:41 -0700 (PDT)
Received: by q40g2000prh.googlegroups.com with HTTP; Tue, 15 Mar 2011 13:37:41
Date: Tue, 15 Mar 2011 13:37:41 -0700 (PDT)
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
rv:220.127.116.11) Gecko/20101203 Firefox/3.6.13 FirePHP/0.5,gzip(gfe)
Subject: Chaining Methods and Performance.
From: brookisme <br...@stickandlogdesigns.com>
To: Android Developers <firstname.lastname@example.org>
Content-Type: text/plain; charset=ISO-8859-1
Hi Guys. When creating methods in my custom classes I like to use the
old trick of returning "this" on a lot of methods so that I can chain
methods together like so
MyCustomClass mcc = new MyCustomClass();
I was wondering if i were to do this with my "setters" (so my setters
had the return type MyCostumClass instead of void) will that hurt
I guess the problem is I don't have a good understanding for what
happens to unused return values.