Interface Put<K,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Removes all of the mappings from this map.
      java.lang.Object put​(K key, V value)
      Associates the specified value with the specified key in this map.
      void putAll​(java.util.Map<? extends K,​? extends V> t)
      Copies all of the mappings from the specified map to this map.
    • Method Detail

      • clear

        void clear()
        Removes all of the mappings from this map.
        See Also:
        Map.clear()
      • put

        java.lang.Object put​(K key,
                             V value)
        Associates the specified value with the specified key in this map.

        Note that the return type is Object, rather than V as in the Map interface. See the class Javadoc for further info.

        Parameters:
        key - key with which the specified value is to be associated
        value - value to be associated with the specified key
        Returns:
        the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)
        See Also:
        Map.put(Object, Object)
      • putAll

        void putAll​(java.util.Map<? extends K,​? extends V> t)
        Copies all of the mappings from the specified map to this map.
        Parameters:
        t - mappings to be stored in this map
        See Also:
        Map.putAll(Map)