You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nima Boustanian <ni...@tn20.com> on 2006/04/14 15:36:33 UTC
Question about abstract instance variables
Hey all
Encountered this piece of code on the Tapestry reference page...
public final static Integer SMALL = new Integer(1);
public final static Integer MEDIUM = new Integer(2);
public final static Integer LARGE = new Integer(3);
public abstract Integer getOrderSize();
public void doSubmit() {
// process order
}
Is it safe to declare the Integers as final statics? I thought all
instance variables in Tapestry should be declared as abstract,
even if they are being fetched by an abstract method - in this case
getOrderSize()
link:
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/RadioGroup.html
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Question about abstract instance variables
Posted by Nima Boustanian <ni...@tn20.com>.
ahhh. You learn new something everyday :)
Nima Boustanian wrote:
> Hey all
>
> Encountered this piece of code on the Tapestry reference page...
>
> public final static Integer SMALL = new Integer(1);
> public final static Integer MEDIUM = new Integer(2);
> public final static Integer LARGE = new Integer(3);
>
> public abstract Integer getOrderSize();
>
> public void doSubmit() {
> // process order
> }
>
>
> Is it safe to declare the Integers as final statics? I thought all
> instance variables in Tapestry should be declared as abstract,
> even if they are being fetched by an abstract method - in this case
> getOrderSize()
>
>
> link:
> http://jakarta.apache.org/tapestry/tapestry/ComponentReference/RadioGroup.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Question about abstract instance variables
Posted by James Carman <ja...@carmanconsulting.com>.
Those are not instance variables. They're static.
-----Original Message-----
From: Nima Boustanian [mailto:nima@tn20.com]
Sent: Friday, April 14, 2006 9:37 AM
To: Tapestry users
Subject: Question about abstract instance variables
Hey all
Encountered this piece of code on the Tapestry reference page...
public final static Integer SMALL = new Integer(1);
public final static Integer MEDIUM = new Integer(2);
public final static Integer LARGE = new Integer(3);
public abstract Integer getOrderSize();
public void doSubmit() {
// process order
}
Is it safe to declare the Integers as final statics? I thought all
instance variables in Tapestry should be declared as abstract,
even if they are being fetched by an abstract method - in this case
getOrderSize()
link:
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/RadioGroup.ht
ml
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org