- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObserver.java
More file actions
Latest commit
14 lines (14 loc) · 427 Bytes
/
Copy pathObserver.java
File metadata and controls
14 lines (14 loc) · 427 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
* Observers implement this interface so that
* their update() method is called by the subject
* when the state of the subject changes.
*/
publicinterfaceObserver {
/**
* This method is called when the state of the subject
* changes.
* @param stock - the specific stock has been traded
* @param newState - the new state of the subject
*/
publicvoidupdate(Subjectstock, Objectnewstate);
}