public interface Observer
Observer接口。
Observable
| Modifier and Type | Method and Description |
|---|---|
void |
update(Observable o, Object arg)
每当观察到的对象发生变化时,都会调用此方法。
|
void update(Observable o, Object arg)
notifyObservers方法,让所有对象的观察者通知更改。
o - 可观察对象。
arg - an argument passed to the
notifyObservers method.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.