While I agree with both of you - accessor methods in java classes is
generally better than (minor) logic in templates, there are cases where
some logic in templates is preferable, ie when there are perhaps 10's or
more different numeric cases on the same property. having 10+ near
identical meth
On Fri, 03 Aug 2012 21:07:27 -0300, Howard Lewis Ship
wrote:
public boolean isNumberThree() { return numericValue == 3; }
In other words, don't put logic in templates, put them in Java classes,
where it can be easily debugged and tested. ;)
--
Thiago H. de Paula Figueiredo
public boolean isNumberThree() { return numericValue == 3; }
Yes, there's some leaky abstractions with method invocations and all
the parameter coercion going on. However, given live class reloading,
creating ad-hoc properties for these comparisons is often more
comparable. Also, instead of "isNu
hi all,
originally have an accessor method:
public int getNumericValue()
{
return myInteger; // auto-boxes to int
}
and wanted to use the following if:
however '==' doesn't work, but i know method calls work so i changed to:
public Integer getNumericValue()
{