Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Grammar fixes for observer
  • Loading branch information
iluwatar committed Jun 22, 2021
commit bbc2a9ddb178587938b04214d3eafaf7a4c53a98
12 changes: 4 additions & 8 deletions observer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ dependents are notified and updated automatically.

## Explanation

Real world example
Real-world example

> In a land far away lives the races of hobbits and orcs. Both of them are mostly outdoors so they
> closely follow the changes in weather. One could say that they are constantly observing the
> In a land far away live the races of hobbits and orcs. Both of them are mostly outdoors so they
> closely follow the weather changes. One could say that they are constantly observing the
> weather.

In plain words
Expand Down Expand Up @@ -152,11 +152,7 @@ be changed.
* When an object should be able to notify other objects without making assumptions about who these
objects are. In other words, you don't want these objects tightly coupled.

## Typical Use Case

* Changing in one object leads to a change in other objects.

## Real world examples
## Known uses

* [java.util.Observer](http://docs.oracle.com/javase/8/docs/api/java/util/Observer.html)
* [java.util.EventListener](http://docs.oracle.com/javase/8/docs/api/java/util/EventListener.html)
Expand Down
2 changes: 1 addition & 1 deletion observer/src/main/java/com/iluwatar/observer/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static void main(String[] args) {
weather.timePasses();
weather.timePasses();

// Generic observer inspired by Java Generics and Collection by Naftalin & Wadler
// Generic observer inspired by Java Generics and Collections by Naftalin & Wadler
LOGGER.info("--Running generic version--");
var genericWeather = new GWeather();
genericWeather.addObserver(new GOrcs());
Expand Down