Skip to content

Commit 4d1aae2

Browse files
committed
Improve Observer Javadoc
1 parent ca6bb7a commit 4d1aae2

File tree

1 file changed

+11
-2
lines changed
  • observer/src/main/java/com/iluwatar/observer

1 file changed

+11
-2
lines changed

observer/src/main/java/com/iluwatar/observer/App.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@
66

77
/**
88
*
9-
* Observer pattern defines one-to-many relationship between objects. The target
10-
* object sends change notifications to its registered observers.
9+
* The Observer pattern is a software design pattern in which an object, called
10+
* the subject, maintains a list of its dependents, called observers, and notifies
11+
* them automatically of any state changes, usually by calling one of their methods.
12+
* It is mainly used to implement distributed event handling systems. The Observer
13+
* pattern is also a key part in the familiar model–view–controller (MVC) architectural
14+
* pattern. The Observer pattern is implemented in numerous programming libraries and
15+
* systems, including almost all GUI toolkits.
16+
* <p>
17+
* In this example {@link Weather} has a state that can be observed. The {@link Orcs}
18+
* and {@link Hobbits} register as observers and receive notifications when the
19+
* {@link Weather} changes.
1120
*
1221
*/
1322
public class App {

0 commit comments

Comments
 (0)