File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
observer/src/main/java/com/iluwatar/observer Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
/**
8
8
*
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.
11
20
*
12
21
*/
13
22
public class App {
You can’t perform that action at this time.
0 commit comments