Created
December 31, 2018 18:03
-
-
Save benjishults/78ab1366bba26fc2c425fe19398efc75 to your computer and use it in GitHub Desktop.
Processor second pass in enum refactor demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Processor { | |
public void processFile(Path file) { | |
switch (DocumentType.forPath(file)) { | |
case TXT: | |
processTextFile(file); | |
break; | |
case MD: | |
processMarkdownFile(file); | |
break; | |
case HTML: | |
processHtmlFile(file); | |
break; | |
} | |
} | |
// ... the rest is as before ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment