Interface myphysicslab.lab.util.Observer

Provided By
All Extended Interfaces
All Known Implementations

Observes a Subject; is notified when something changes in the Subject. The change can be in the value of a Parameter, or the occurrence of some event such as a GenericEvent. The Observer is connected to the Subject via the Subject.addObserver method, which is typically called by the Observer's constructor or the entity that creates the Observer. When a change occurs, the Subject.broadcast method is called which results in the Observer's observe method being called.

Implements the Observer design pattern. See myphysicslab.lab.util.Subject for more extensive documentation.

Instance Methods