Hi,

----- Original Message ----

> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

>
>         If I had a class that has a lot of boolean flags and I have an IF 
> condition that requires me
> to do a lot of AND/OR among these boolean conditions is there a design 
> pattern that will help
> me to refactor this code ?

It will depend on what your code looks like and what you're trying to
 accomplish. You might want to check Joshua Kerievsky's "Refactoring to
 Patterns" book, which includes some refactorings specifically designed
 to deal with Conditional Complexity:

- Replace Conditional Logic with Strategy
- Move Embellishment to Decorator
- Replace State-Altering Conditionals with State
- Introduce Null Object.

Hope this helps.

Saludos!
Fernando.






      
____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
_______________________________________________
patterns-discussion mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/patterns-discussion

Reply via email to