public class DataSetPublisher extends Publisher<DataSetSubscriber>
This class extends the Publisher class of the DataSetSubscriber type. It is
used to notify the dataset subscriber when the dataset changes or the dataset is invalidated.
DataSetSubscriber,
PublishermSubscribers| 构造器 | 说明 |
|---|---|
DataSetPublisher() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
informInvalidated() |
Notifies the subscriber that the subscribed data becomes invalid.
|
void |
notifyChanged() |
Notifies the subscriber that the subscribed data has changed.
|
void |
notifyItemChanged(int position) |
Notifies the subscriber that the subscribed item data has changed.
|
void |
notifyItemInserted(int position) |
Notifies the subscriber that the subscribed item has inserted.
|
void |
notifyItemRangeChanged(int startPos,
int countItems) |
Notifies the subscriber that subscribed items has changed.
|
void |
notifyItemRangeInserted(int startPos,
int countItems) |
Notifies the subscriber that subscribed items has inserted.
|
void |
notifyItemRangeRemoved(int startPos,
int countItems) |
Notifies the subscriber that subscribed items has removed.
|
void |
notifyItemRemoved(int position) |
Notifies the subscriber that the subscribed item has removed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterSubscriber, unregisterSubscriber, unregisterSubscriberpublic void notifyChanged()
When the data changes, this method is used to call the DataSetSubscriber#onChanged interface of
each subscriber for handling the changes.
public void informInvalidated()
When the data becomes invalid, this method is used to call the DataSetSubscriber#onInvalidated
interface of each subscriber to notify the subscriber.
public void notifyItemChanged(int position)
When the item data changes, this method is used to call the DataSetSubscriber#onItemChanged(int)
interface of each subscriber for handling the changes.
position - Indicates the position of the item in the data set.public void notifyItemInserted(int position)
When the item has inserted, this method is used to call the DataSetSubscriber#onItemInserted(int)
interface of each subscriber for handling the insert.
position - Indicates the position of the item in the data set.public void notifyItemRemoved(int position)
When the item has removed, this method is used to call the DataSetSubscriber#onItemRemoved(int)
interface of each subscriber for handling the remove.
position - Indicates the position of the item in the data set.public void notifyItemRangeChanged(int startPos,
int countItems)
When data item changes, this method is used to call the
DataSetSubscriber#onItemRangeChanged(int, int) interface of each subscriber for handling the changes.
startPos - Indicates the start position of the item in the data set.countItems - Indicates the number of affected items in the data set.public void notifyItemRangeInserted(int startPos,
int countItems)
When data items inserted, this method is used to call the
DataSetSubscriber#onItemRangeInserted(int, int) interface of each subscriber for handling the changes.
startPos - Indicates the start position of the item in the data set.countItems - Indicates the number of affected items in the data set.public void notifyItemRangeRemoved(int startPos,
int countItems)
When data items has removed, this method is used to call the
DataSetSubscriber#onItemRangeRemoved interface of each subscriber for handling the remove.
startPos - Indicates the start position of the item in the data set.countItems - Indicates the number of affected items in the data set.