private idleState() { if (instance != null) { return; } instance = this; }
// Constructor. private idleState() { // If our state already exists, return null. if (instance != null) { return; } // Else, set the instance to one instance of the state. instance = this; }