As far as I understand, Strategy classes are generally stateful but
they don't impose any such limitation; an implementor is free to choose
to have the Strategy class either stateful or stateless as applicable.
The context used in Strategy carries information on which the varying
algorithms can act upon. So if the state would be required for the
algorithms, then the context could include the state information as part
of it.

Just my 2 cents :-)

Thanks, Soms.

Message: 1
Date: Fri, 21 Apr 2006 03:47:02 -0700 (PDT)
From: Nikolay Atanasov <[EMAIL PROTECTED]>
Subject: [patterns-discussion] Are strategy classes stateful?
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=iso-8859-1

To All!

Hello

I have a question about strategy pattern. Can strategy
classes be stateful or they are generally stateless?

Nikolay


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

_______________________________________________
patterns-discussion mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/patterns-discussion

Reply via email to