File tree 2 files changed +5
-9
lines changed
src/main/java/com/iluwatar/observer
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ dependents are notified and updated automatically.
21
21
22
22
## Explanation
23
23
24
- Real world example
24
+ Real- world example
25
25
26
- > In a land far away lives the races of hobbits and orcs. Both of them are mostly outdoors so they
27
- > closely follow the changes in weather. One could say that they are constantly observing the
26
+ > In a land far away live the races of hobbits and orcs. Both of them are mostly outdoors so they
27
+ > closely follow the weather changes . One could say that they are constantly observing the
28
28
> weather.
29
29
30
30
In plain words
@@ -152,11 +152,7 @@ be changed.
152
152
* When an object should be able to notify other objects without making assumptions about who these
153
153
objects are. In other words, you don't want these objects tightly coupled.
154
154
155
- ## Typical Use Case
156
-
157
- * Changing in one object leads to a change in other objects.
158
-
159
- ## Real world examples
155
+ ## Known uses
160
156
161
157
* [ java.util.Observer] ( http://docs.oracle.com/javase/8/docs/api/java/util/Observer.html )
162
158
* [ java.util.EventListener] ( http://docs.oracle.com/javase/8/docs/api/java/util/EventListener.html )
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public static void main(String[] args) {
58
58
weather .timePasses ();
59
59
weather .timePasses ();
60
60
61
- // Generic observer inspired by Java Generics and Collection by Naftalin & Wadler
61
+ // Generic observer inspired by Java Generics and Collections by Naftalin & Wadler
62
62
LOGGER .info ("--Running generic version--" );
63
63
var genericWeather = new GWeather ();
64
64
genericWeather .addObserver (new GOrcs ());
You can’t perform that action at this time.
0 commit comments