I have a series of methods, each processing unique business rules, and each return a boolean result. I need ALL the methods executed, but if any one of them returns a true, then additional processing is required on dependent data. So, I can't just do:
boolean bizRuleFailed = false;
bizRuleFailed = methOneRule(data) || methTwoRule(data) || methThreeRule(data);
because it would stop after the first true-result method. So I am doing this:
boolean bizRuleFailed = false;
bizRuleFailed = methOneRule(data) || bizRuleFailed;
bizRuleFailed = methTwoRule(data) || bizRuleFailed;
bizRuleFailed = methThreeRule(data) || bizRuleFailed;
, which is far from ideal. What's a good way to do this instead? Thanks