File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes how to  avoid if else blocks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to  avoid if else blocks " Watch "how to  avoid if else blocks " New topic
Author

how to avoid if else blocks

srini carry
Ranch Hand

Joined: Nov 30, 2007
Posts: 83


here is one of my validator classes. I am wondering if there is any better way to handle such simple validation rules and avoid all these if else blocks can I follow any design pattern or can I use any scripting language which can make this simple to read
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to avoid if else blocks