DataBufferObserverSet

public final classDataBufferObserverSetimplementsDataBufferObserver,DataBufferObserver.Observable

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

Summary

Public constructors

Public methods

void

Register the given observer for receiving change notifications.

void

Clears the set of observers.

boolean

Returns true if this has any registered observers.

void

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

Unregister the given observer from receiving change notifications.

Public constructors

DataBufferObserverSet

publicDataBufferObserverSet()

Public methods

addObserver

public voidaddObserver(DataBufferObserverobserver)

Register the given observer for receiving change notifications.

clear

public voidclear()

Clears the set of observers.

hasObservers

public booleanhasObservers()

Returns true if this has any registered observers.

onDataChanged

public voidonDataChanged()

Called when the overall data changes.

onDataRangeChanged

public voidonDataRangeChanged(int position, int count)

Called when a range of items changes.

onDataRangeInserted

public voidonDataRangeInserted(int position, int count)

Called when a range of items is inserted.

onDataRangeMoved

public voidonDataRangeMoved(int fromPosition, int toPosition, int count)

Called when a range of items is moved.

onDataRangeRemoved

public voidonDataRangeRemoved(int position, int count)

Called when a range of items is removed.

removeObserver

public voidremoveObserver(DataBufferObserverobserver)

Unregister the given observer from receiving change notifications.