Interface DelegatedMap<K,​V>

    • Method Detail

      • clear

        default void clear()
        Removes all mappings from the map
        Specified by:
        clear in interface Map<K,​V>
        See Also:
        Map.clear()
      • containsKey

        default boolean containsKey​(Object key)
        Returns true if this map contains a mapping for the specified key.
        Specified by:
        containsKey in interface Map<K,​V>
        Parameters:
        key - key whose presence in this map is to be tested
        Returns:
        true if this map contains a mapping for the specified key
        See Also:
        Map.containsKey(Object)
      • containsValue

        default boolean containsValue​(Object value)
        Returns true if this map maps one or more keys to the specified value.
        Specified by:
        containsValue in interface Map<K,​V>
        Parameters:
        value - value whose presence in this map is to be tested
        Returns:
        true if this map maps one or more keys to the specified value
        See Also:
        Map.containsValue(Object)
      • get

        default V get​(Object key)
        Gets the value to which the specified key is mapped.

        The underlying Map will determine the behavior if there is no key.

        Specified by:
        get in interface Map<K,​V>
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which the specified key is mapped, or null if this map contains no mapping for the key
        See Also:
        Map.get(Object)
      • getDelegate

        Map<K,​VgetDelegate()
        Gets the map to which all other Map calls are delegated
        Returns:
        The Map to which all calls are delegated
      • isEmpty

        default boolean isEmpty()
        Returns true if this map contains no key-value mappings.
        Specified by:
        isEmpty in interface Map<K,​V>
        Returns:
        true if this map contains no key-value mappings
      • keySet

        default Set<KkeySet()
        Returns a Set view of the keys contained in this map.

        The behavior of the Set is determined by the underlying Map.

        Specified by:
        keySet in interface Map<K,​V>
        Returns:
        a set view of the keys contained in this map
        See Also:
        Map.keySet()
      • put

        default V put​(K key,
                      V value)
        Specified by:
        put in interface Map<K,​V>
        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.
      • putAll

        default void putAll​(Map<? extends K,​? extends V> m)
        Copies all of the mappings from the specified map to this map.
        Specified by:
        putAll in interface Map<K,​V>
        Parameters:
        m - mappings to be stored in this map
        See Also:
        Map.putAll(Map)
      • remove

        default V remove​(Object key)
        Removes the mapping for a key from this map if it is present.
        Specified by:
        remove in interface Map<K,​V>
        Parameters:
        key - key whose mapping is to be removed from the map
        Returns:
        the previous value associated with key, or null if there was no mapping for key.
      • size

        default int size()
        Returns the number of key-value mappings in this map.
        Specified by:
        size in interface Map<K,​V>
        Returns:
        the number of key-value mappings in this map
        See Also:
        Map.size()
      • values

        default Collection<Vvalues()
        Returns a Collection view of the values contained in this map.
        Specified by:
        values in interface Map<K,​V>
        Returns:
        a collection view of the values contained in this map