DataBufferObserverSet

class DataBufferObserverSet : DataBufferObserver, DataBufferObserver.Observable


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

Summary

Public constructors

Public functions

Unit

Register the given observer for receiving change notifications.

Unit

Clears the set of observers.

Boolean

Returns true if this has any registered observers.

Unit

Called when the overall data changes.

Unit
onDataRangeChanged(position: Int, count: Int)

Called when a range of items changes.

Unit
onDataRangeInserted(position: Int, count: Int)

Called when a range of items is inserted.

Unit
onDataRangeMoved(fromPosition: Int, toPosition: Int, count: Int)

Called when a range of items is moved.

Unit
onDataRangeRemoved(position: Int, count: Int)

Called when a range of items is removed.

Unit

Unregister the given observer from receiving change notifications.

Public constructors

DataBufferObserverSet

DataBufferObserverSet()

Public functions

addObserver

fun addObserver(observer: DataBufferObserver!): Unit

Register the given observer for receiving change notifications.

clear

fun clear(): Unit

Clears the set of observers.

hasObservers

fun hasObservers(): Boolean

Returns true if this has any registered observers.

onDataChanged

fun onDataChanged(): Unit

Called when the overall data changes.

onDataRangeChanged

fun onDataRangeChanged(position: Int, count: Int): Unit

Called when a range of items changes.

onDataRangeInserted

fun onDataRangeInserted(position: Int, count: Int): Unit

Called when a range of items is inserted.

onDataRangeMoved

fun onDataRangeMoved(fromPosition: Int, toPosition: Int, count: Int): Unit

Called when a range of items is moved.

onDataRangeRemoved

fun onDataRangeRemoved(position: Int, count: Int): Unit

Called when a range of items is removed.

removeObserver

fun removeObserver(observer: DataBufferObserver!): Unit

Unregister the given observer from receiving change notifications.