Simplifying Conditional Expressions

1. Decompose Conditional

2. Consolidate Conditional Expression

3. Consolidate Duplicate Conditional Fragments

4. Remove Control Flag  use break or return

5. Replace Nested Conditional with Guard

6. Replace Conditional with polymorphism

7. Introduce Null Object

8. Introduce Assertion

你可能感兴趣的:(Simplifying Conditional Expressions)