Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
  
  
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
| Inherited methods | 
|---|
|  From
class 
  
    android.support.v4.util.ArrayMap
  
 | 
|  From
class 
  
    android.support.v4.util.SimpleArrayMap
  
  
   
    
      
  
  
  
  
    | 
        
        
        
        
        
        void | 
      clear()
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      containsKey(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      containsValue(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        void | 
      ensureCapacity(int arg0)
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      equals(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        V | 
      get(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        int | 
      hashCode()
       |  
  
  
    | 
        
        
        
        
        
        int | 
      indexOfKey(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      isEmpty()
       |  
  
  
    | 
        
        
        
        
        
        K | 
      keyAt(int arg0)
       |  
  
  
    | 
        
        
        
        
        
        V | 
      put(K arg0, V arg1)
       |  
  
  
    | 
        
        
        
        
        
        void | 
      putAll(SimpleArrayMap<? extends K, ? extends V> arg0)
       |  
  
  
    | 
        
        
        
        
        
        V | 
      remove(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        V | 
      removeAt(int arg0)
       |  
  
  
    | 
        
        
        
        
        
        V | 
      setValueAt(int arg0, V arg1)
       |  
  
  
    | 
        
        
        
        
        
        int | 
      size()
       |  
  
  
    | 
        
        
        
        
        
        String | 
      toString()
       |  
  
  
    | 
        
        
        
        
        
        V | 
      valueAt(int arg0)
       |  | 
|  From
class 
  
    java.lang.Object
  
  
   
    
      
  
  
  
  
    | 
        
        
        
        
        
        Object | 
      clone()
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      equals(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        void | 
      finalize()
       |  
  
  
    | 
        
        
        
        final
        
        Class<?> | 
      getClass()
       |  
  
  
    | 
        
        
        
        
        
        int | 
      hashCode()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      notify()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      notifyAll()
       |  
  
  
    | 
        
        
        
        
        
        String | 
      toString()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long arg0, int arg1)
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long arg0)
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait()
       |  | 
|  From
interface 
  
    java.util.Map
  
  
   
    
      
  
  
  
  
    | 
        abstract
        
        
        
        
        void | 
      clear()
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      compute(K arg0, BiFunction<? super K, ? super V, ? extends V> arg1)
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      computeIfAbsent(K arg0, Function<? super K, ? extends V> arg1)
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      computeIfPresent(K arg0, BiFunction<? super K, ? super V, ? extends V> arg1)
       |  
  
  
    | 
        abstract
        
        
        
        
        boolean | 
      containsKey(Object arg0)
       |  
  
  
    | 
        abstract
        
        
        
        
        boolean | 
      containsValue(Object arg0)
       |  
  
  
    | 
        abstract
        
        
        
        
        Set<Entry<K, V>> | 
      entrySet()
       |  
  
  
    | 
        abstract
        
        
        
        
        boolean | 
      equals(Object arg0)
       |  
  
  
    | 
        
        default
        
        
        
        void | 
      forEach(BiConsumer<? super K, ? super V> arg0)
       |  
  
  
    | 
        abstract
        
        
        
        
        V | 
      get(Object arg0)
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      getOrDefault(Object arg0, V arg1)
       |  
  
  
    | 
        abstract
        
        
        
        
        int | 
      hashCode()
       |  
  
  
    | 
        abstract
        
        
        
        
        boolean | 
      isEmpty()
       |  
  
  
    | 
        abstract
        
        
        
        
        Set<K> | 
      keySet()
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      merge(K arg0, V arg1, BiFunction<? super V, ? super V, ? extends V> arg2)
       |  
  
  
    | 
        abstract
        
        
        
        
        V | 
      put(K arg0, V arg1)
       |  
  
  
    | 
        abstract
        
        
        
        
        void | 
      putAll(Map<? extends K, ? extends V> arg0)
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      putIfAbsent(K arg0, V arg1)
       |  
  
  
    | 
        
        default
        
        
        
        boolean | 
      remove(Object arg0, Object arg1)
       |  
  
  
    | 
        abstract
        
        
        
        
        V | 
      remove(Object arg0)
       |  
  
  
    | 
        
        default
        
        
        
        boolean | 
      replace(K arg0, V arg1, V arg2)
       |  
  
  
    | 
        
        default
        
        
        
        V | 
      replace(K arg0, V arg1)
       |  
  
  
    | 
        
        default
        
        
        
        void | 
      replaceAll(BiFunction<? super K, ? super V, ? extends V> arg0)
       |  
  
  
    | 
        abstract
        
        
        
        
        int | 
      size()
       |  
  
  
    | 
        abstract
        
        
        
        
        Collection<V> | 
      values()
       |  | 
|  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. | 
    
 
    removeAll
    
boolean removeAll (Collection<?> collection)
    
    
    
  
    
    | Parameters | 
|---|
      
        | collection | Collection | 
    
    
 
    removeAt
    
V removeAt (int index)
    
    
    
  
    
    
 
    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 | 
    
    
 
    setValueAt
    
V setValueAt (int index, 
                V value)
    
    
    
  
    
    | Parameters | 
|---|
      
        | index | int | 
      
        | value | V | 
    
    
 
 
  
  
    
    - Annotations
- Interfaces
- Classes
 
 
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  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 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]