Overall, since you seem to prefer object oriented programming :), you might consider making a superclass called "NoOpBalancer" and just make the balancer extend the noon-balancer to avoid all the if tests. And then just use a static factory method to instantiate the proper balancer.