DataBufferObserver

public interface DataBufferObserver

Known direct subclasses
DataBufferObserverSet

Utility class for managing a set of observers and distributing their notifications.


An interface for notifying an observer about changes to a DataBuffer.

To support adding multiple observers, see DataBufferObserverSet. It allows you to delegate addObserver and removeObserver to it and it will handle distributing all the notifications to all registered observers.

See also
DataBuffer

Summary

Nested types

Interface a data buffer can implement to expose the fact that it supports observation.

Public methods

abstract void

Called when the overall data changes.

abstract void
onDataRangeChanged(int position, int count)

Called when a range of items changes.

abstract void
onDataRangeInserted(int position, int count)

Called when a range of items is inserted.

abstract void
onDataRangeMoved(int fromPosition, int toPosition, int count)

Called when a range of items is moved.

abstract void
onDataRangeRemoved(int position, int count)

Called when a range of items is removed.

Public methods

onDataChanged

abstract void onDataChanged()

Called when the overall data changes.

onDataRangeChanged

abstract void onDataRangeChanged(int position, int count)

Called when a range of items changes.

onDataRangeInserted

abstract void onDataRangeInserted(int position, int count)

Called when a range of items is inserted.

onDataRangeMoved

abstract void onDataRangeMoved(int fromPosition, int toPosition, int count)

Called when a range of items is moved.

onDataRangeRemoved

abstract void onDataRangeRemoved(int position, int count)

Called when a range of items is removed.