/** * This method runs through all observers and informs them about the current state. */ private final void notifyStateObservers() { // Get the current state to make sure that all observers get the same state. final STATE currState = this.state; // Now inform the observers. for (final IStateObserver observer : this.stateObservers) { observer.update(this, currState); } }
/** * This method runs through all observers and informs them about the current state. */ private final void notifyStateObservers() { // Get the current state to make sure that all observers get the same state. final STATE currState = this.state; // Now inform the observers. for (final IStateObserver observer : this.stateObservers) { observer.update(this, currState); } }