SetChangeAdapter

class SetChangeAdapter<D>

An adapter that implements the reactive change model for sets

Parameters

D

the type of data held by the set

Constructors

SetChangeAdapter
Link copied to clipboard
fun <D> SetChangeAdapter(initialDataSet: Set<D>)
Initializes the adapter with initialDataSet without emitting a change message
SetChangeAdapter
Link copied to clipboard
fun SetChangeAdapter()
Default constructor

Functions

add
Link copied to clipboard
fun add(data: D): Boolean
Adds data to the set and emits a change message to surrounding observersThe change snapshot will contain data that was added
addAll
Link copied to clipboard
fun addAll(dataSet: Set<D>): Boolean
Adds dataSet to the set and emits a change message to surrounding observersThe change snapshot will contain a copy of dataSet that was just added
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getAll
Link copied to clipboard
fun getAll(): Set<D>
Retrieves a snapshot of the current set
getObservable
Link copied to clipboard
fun getObservable(): Observable<ChangeMessageSet<D>>
Retrieves a reference to the observable used for listening to change messages
hashCode
Link copied to clipboard
open fun hashCode(): Int
remove
Link copied to clipboard
fun remove(data: D): Boolean
Removes data from the set and emits a change message to surrounding observersThe change snapshot will contain data that was just removed
removeAll
Link copied to clipboard
fun removeAll(dataSet: Set<D>): Boolean
Removes dataSet from the set and emits a change message to surrounding observersThe change snapshot will contain a copy of dataSet that was just removed
toString
Link copied to clipboard
open fun toString(): String