简体   繁体   中英

What's the difference between ContentObservable and DataSetObservable?

They both inherit from Observable. And their functions do not differ by much, why not provide only a single class?

As you can see from code sources, DataSetObservable is sending notifications to a list of DataSetObserver objects, while ContentObservable is sending notifications to a list of ContentObserver objects

See sources: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/database/DataSetObservable.java

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/database/ContentObservable.java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM