java.lang.Object | |
↳ | com.tencent.wcdb.Observable<T> |
Provides methods for registering or unregistering arbitrary observers in an ArrayList. This abstract class is intended to be subclassed and specialized to maintain a registry of observers of specific types and dispatch notifications to them.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Observable() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
registerObserver(T observer)
Adds an observer to the list.
| ||||||||||
void |
unregisterAll()
Remove all registered observers.
| ||||||||||
void |
unregisterObserver(T observer)
Removes a previously registered observer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adds an observer to the list. The observer cannot be null and it must not already be registered.
observer | the observer to register |
---|
IllegalArgumentException | the observer is null |
---|---|
IllegalStateException | the observer is already registered |
Remove all registered observers.
Removes a previously registered observer. The observer must not be null and it must already have been registered.
observer | the observer to unregister |
---|
IllegalArgumentException | the observer is null |
---|---|
IllegalStateException | the observer is not yet registered |