I have a main class called GameStart. Now, in video games, in order to hold the different types of scenes, like menu, actual gameplay, cutscenes, and etc, you have things called states. Each state is an individual set of code that is not affected when it is not on. When I start GameStart, it automatically switches to my first state, MenuState. When I am done with the menu, and the player clicks the "continue" button, I want MenuState to tell GameStart to switch the state to GameplayState. I would do it in MenuState if I could, but the only thing I could find in the library I am using is something to leave the state, but nothing to switch them. And I also can't just tell GameStart to update until it gets a leave notification, because the update() method in GameStart is a final protected method, and I don't want to change the source code of my library.