ObservableMap
public
interface
ObservableMap
implements
Map<K, V>
android.databinding.ObservableMap<K, V> |
Known Indirect Subclasses
ObservableArrayMap<K, V>
|
A Map
that notifies when items change. This kind of Map may be data bound
and have the UI update as the map changes.
Implementers must call onMapChanged(ObservableMap, Object)
whenever
an item is added, changed, or removed.
ObservableArrayMap is a convenient implementation of ObservableMap. MapChangeRegistry may help other implementations manage the callbacks.
See also:
Summary
Nested classes | |
---|---|
class |
ObservableMap.OnMapChangedCallback<T extends ObservableMap<K, V>, K, V>
A callback receiving notifications when an ObservableMap changes. |
Public methods | |
---|---|
abstract
void
|
addOnMapChangedCallback(OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> callback)
Adds a callback to listen for changes to the ObservableMap. |
abstract
void
|
removeOnMapChangedCallback(OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> callback)
Removes a previously added callback. |
Inherited methods | |
---|---|
From
interface
java.util.Map
|
Public methods
addOnMapChangedCallback
void addOnMapChangedCallback (OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> callback)
Adds a callback to listen for changes to the ObservableMap.
Parameters | |
---|---|
callback |
OnMapChangedCallback : The callback to start listening for events.
|
removeOnMapChangedCallback
void removeOnMapChangedCallback (OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> callback)
Removes a previously added callback.
Parameters | |
---|---|
callback |
OnMapChangedCallback : The callback that no longer needs to be notified of map changes.
|
Annotations
Interfaces
Classes
- BaseObservable
- CallbackRegistry
- CallbackRegistry.NotifierCallback
- DataBindingUtil
- ListChangeRegistry
- MapChangeRegistry
- MergedDataBinderMapper
- Observable.OnPropertyChangedCallback
- ObservableArrayList
- ObservableArrayMap
- ObservableBoolean
- ObservableByte
- ObservableChar
- ObservableDouble
- ObservableField
- ObservableFloat
- ObservableInt
- ObservableList.OnListChangedCallback
- ObservableLong
- ObservableMap.OnMapChangedCallback
- ObservableParcelable
- ObservableShort
- OnRebindCallback
- PropertyChangeRegistry
- ViewDataBinding
- ViewStubProxy
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.