Created
September 15, 2011 21:17
-
-
Save tscho/1220505 to your computer and use it in GitHub Desktop.
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
enum FileState { | |
NEW { | |
FileState pass() { return DOWNLOADING; } | |
FileState fail() { return NEW; } | |
}, | |
DOWNLOADING { | |
FileState pass() { return PROCESSING; } | |
FileState fail() { return DLFAILED; } | |
}, | |
DLFAILED { | |
FileState pass() { return DLFAILED; } | |
FileState fail() { return DLFAILED; } | |
}, | |
PROCESSING { | |
FileState pass() { return DONE; } | |
FileState fail() { return PROCESSFAILED; } | |
}, | |
PROCESSFAILED { | |
FileState pass() { return PROCESSFAILED; } | |
FileState fail() { return PROCESSFAILED; } | |
}, | |
DONE { | |
FileState pass() { return DONE; } | |
FileState fail() { return DONE; } | |
}; | |
abstract FileState pass(); | |
abstract FileState fail(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment