Class CachedHashCodeArrayMap<K,​V>

  • Type Parameters:
    K - the key type.
    V - the value type.
    All Implemented Interfaces:
    java.util.Map<K,​V>

    public final class CachedHashCodeArrayMap<K,​V>
    extends androidx.collection.ArrayMap<K,​V>
    An ArrayMap that caches its hashCode to support efficient lookup.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      int hashCode()  
      V put​(K key, V value)  
      void putAll​(androidx.collection.SimpleArrayMap<? extends K,​? extends V> simpleArrayMap)  
      V removeAt​(int index)  
      V setValueAt​(int index, V value)  
      • Methods inherited from class androidx.collection.ArrayMap

        containsAll, entrySet, keySet, putAll, removeAll, retainAll, values
      • Methods inherited from class androidx.collection.SimpleArrayMap

        containsKey, containsValue, ensureCapacity, equals, get, getOrDefault, indexOfKey, isEmpty, keyAt, putIfAbsent, remove, remove, replace, replace, size, toString, valueAt
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size
    • Constructor Detail

      • CachedHashCodeArrayMap

        public CachedHashCodeArrayMap()
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
        Overrides:
        clear in class androidx.collection.SimpleArrayMap<K,​V>
      • setValueAt

        public V setValueAt​(int index,
                            V value)
        Overrides:
        setValueAt in class androidx.collection.SimpleArrayMap<K,​V>
      • put

        public V put​(K key,
                     V value)
        Specified by:
        put in interface java.util.Map<K,​V>
        Overrides:
        put in class androidx.collection.SimpleArrayMap<K,​V>
      • putAll

        public void putAll​(androidx.collection.SimpleArrayMap<? extends K,​? extends V> simpleArrayMap)
        Overrides:
        putAll in class androidx.collection.SimpleArrayMap<K,​V>
      • removeAt

        public V removeAt​(int index)
        Overrides:
        removeAt in class androidx.collection.SimpleArrayMap<K,​V>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<K,​V>
        Overrides:
        hashCode in class androidx.collection.SimpleArrayMap<K,​V>