This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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