iluwatar/java-design-patterns — pull request #10 by mafagafogigante (2014-10-20 15:39:16+00:00)
Title: Changes to the observer pattern

A new diagram, hopefully better.

Some code rewriting I thought would make it neater.

Weather.java : lines 31 ~ 33 : cannot comment about performance, but it should **not** be an issue for this program. I spent some time trying to understand why a switch was used and, after seeing that it does not "change the order" of the enumerated constants, I just rewrote it to a simpler "getTheNext" version.