Skip to content

Most visited

Recently visited

navigation

ObservableArrayMap

public class ObservableArrayMap
extends ArrayMap<K, V> implements ObservableMap<K, V>

java.lang.Object
   ↳ android.support.v4.util.SimpleArrayMap<K, V>
     ↳ android.support.v4.util.ArrayMap<K, V>
       ↳ android.databinding.ObservableArrayMap<K, V>


Summary

Public constructors

ObservableArrayMap()

Public methods

void addOnMapChangedCallback(OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> listener)

Adds a callback to listen for changes to the ObservableMap.

void clear()
V put(K k, V v)
boolean removeAll(Collection<?> collection)
V removeAt(int index)
void removeOnMapChangedCallback(OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> listener)

Removes a previously added callback.

boolean retainAll(Collection<?> collection)
V setValueAt(int index, V value)

Inherited methods

From class android.support.v4.util.ArrayMap
From class android.support.v4.util.SimpleArrayMap
From class java.lang.Object
From interface java.util.Map
From interface android.databinding.ObservableMap

Public constructors

ObservableArrayMap

ObservableArrayMap ()

Public methods

addOnMapChangedCallback

void addOnMapChangedCallback (OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> listener)

Adds a callback to listen for changes to the ObservableMap.

Parameters
listener OnMapChangedCallback: The callback to start listening for events.

clear

void clear ()

put

V put (K k, 
                V v)

Parameters
k K

v V

Returns
V

removeAll

boolean removeAll (Collection<?> collection)

Parameters
collection Collection

Returns
boolean

removeAt

V removeAt (int index)

Parameters
index int

Returns
V

removeOnMapChangedCallback

void removeOnMapChangedCallback (OnMapChangedCallback<? extends ObservableMap<K, V>, K, V> listener)

Removes a previously added callback.

Parameters
listener OnMapChangedCallback: The callback that no longer needs to be notified of map changes.

retainAll

boolean retainAll (Collection<?> collection)

Parameters
collection Collection

Returns
boolean

setValueAt

V setValueAt (int index, 
                V value)

Parameters
index int

value V

Returns
V

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)