Back to project page khandroid.
The source code is released under:
Apache License
If you think the Android project khandroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.khandroid.state_app; //from ww w . ja v a 2 s. c o m public class AppStateContextImpl implements AppStateContext { private AppState mState; public AppStateContextImpl() { super(); } @Override public void switchToState(AppState state) { if (state == null) { throw new IllegalArgumentException("state is null"); } if (mState != null) { mState.onExit(); } mState = state; mState.onEnter(this); } @Override public AppState getState() { return mState; } }