implementsDataBufferObserver DataBufferObserver.Observable
Utility class for managing a set of observers and distributing their notifications.
See Also
Public Constructor Summary
Public Method Summary
void |
addObserver(DataBufferObserver
observer)
Register the given observer for receiving change notifications.
|
void |
clear()
Clears the set of observers.
|
boolean |
hasObservers()
Returns true if this has any registered observers.
|
void |
onDataChanged()
Called when the overall data changes.
|
void |
onDataRangeChanged(int position, int count)
Called when a range of items changes.
|
void |
onDataRangeInserted(int position, int count)
Called when a range of items is inserted.
|
void |
onDataRangeMoved(int fromPosition, int toPosition, int count)
Called when a range of items is moved.
|
void |
onDataRangeRemoved(int position, int count)
Called when a range of items is removed.
|
void |
removeObserver(DataBufferObserver
observer)
Unregister the given observer from receiving change notifications.
|
Inherited Method Summary
Public Constructors
publicDataBufferObserverSet()
Public Methods
public voidaddObserver(DataBufferObserver observer)
Register the given observer for receiving change notifications.
public voidclear()
Clears the set of observers.
public booleanhasObservers()
Returns true if this has any registered observers.
public voidonDataChanged()
Called when the overall data changes.
public voidonDataRangeChanged(int position, int count)
Called when a range of items changes.
public voidonDataRangeInserted(int position, int count)
Called when a range of items is inserted.
public voidonDataRangeMoved(int fromPosition, int toPosition, int count)
Called when a range of items is moved.
public voidonDataRangeRemoved(int position, int count)
Called when a range of items is removed.
public voidremoveObserver(DataBufferObserver observer)
Unregister the given observer from receiving change notifications.