////////////// Observer pattern interfaces //////////////// /* In this variation of the Observer pattern, there is a separate method in each observee class for notifying a particular observer, in addition to the notify() method that notifies all observers. The update method of an observer class accepts a pointer to the observee (usually the observee passes "this" to it). This allows the observer to get all sorts of information about the observee. This is an alternative to maintaining a pointer to the observee within the observer object. Finally, the update method returns an object so it can communicate info back to the observee who notified it. If there's nothing to return, just return null. */ public interface observee // subject { void attach(observer obv); void detach(observer obv); void notify(); void notify(observer obv); // my addition - notify a single observer } public interface observer { object update(observee obe); // observee should pass "this" to observer }