Created
June 21, 2015 14:30
-
-
Save maiha/e089e272a5e56513c8b3 to your computer and use it in GitHub Desktop.
FSMでStateが利用するDataを型安全にする
This file contains hidden or 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
onTransition { | |
case _ -> AdapterConsuming if ! nextStateData.isInstanceOf[ConsumingData] => | |
throw new IllegalArgumentException(s"AdapterConsuming expects ConsumingData, but got ${nextStateData.getClass.getSimpleName}".red) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment