This is repository contains solution examples on how to avoid "IF trees".
Master branch contains BillingService class with nasty "IF tree".
Branch ifs-removed contains solution how to avoid "IF tree" in BillingService class.
Branch ifs-removed-using-guice contains solution how to avoid "IF tree" and how to invert dependencies using Guice dependency injection framework.
Branch ifs-removed-using-dagger2 contains solution how to avoid "IF tree" and how to invert dependencies using Dagger2 dependency injection framework.