# Class WeakHashMap<K,V>

java.lang.Object
com.codename1.ui.util.WeakHashMap<K,V>

All Implemented Interfaces:
  `Map<K,V>`

public class WeakHashMap<K,V> extends Object implements Map<K,V>
Helper weak hash map substitute

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Map

  `Map.Entry<K,V>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WeakHashMap()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  `boolean`
  `containsKey(Object key)`
  `boolean`
  `containsValue(Object value)`
  This method is unsupported in the weak hash map
  `Set<Map.Entry<K,V>>`
  `entrySet()`
  Unsupported operation
  `V`
  `get(Object key)`
  `boolean`
  `isEmpty()`
  `Set<K>`
  `keySet()`
  `V`
  `put(K key, V value)`
  `void`
  `putAll(Map<? extends K, ? extends V> m)`
  `V`
  `remove(Object key)`
  `int`
  `size()`
  `Collection<V>`
  `values()`
  Unsupported operation

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Map

  `compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll`

- ## Constructor Details

  - ### WeakHashMap

    public WeakHashMap()

- ## Method Details

  - ### size

    public int size()
    Specified by:
      `size` in interface `Map<K,V>`

  - ### isEmpty

    public boolean isEmpty()
    Specified by:
      `isEmpty` in interface `Map<K,V>`

  - ### containsKey

    public boolean containsKey(Object key)
    Specified by:
      `containsKey` in interface `Map<K,V>`

  - ### containsValue

    public boolean containsValue(Object value)
    This method is unsupported in the weak hash map
    Specified by:
      `containsValue` in interface `Map<K,V>`

  - ### get

    public V get(Object key)
    Specified by:
      `get` in interface `Map<K,V>`

  - ### put

    public V put(K key, V value)
    Specified by:
      `put` in interface `Map<K,V>`

  - ### remove

    public V remove(Object key)
    Specified by:
      `remove` in interface `Map<K,V>`

  - ### putAll

    public void putAll(Map<? extends K, ? extends V> m)
    Specified by:
      `putAll` in interface `Map<K,V>`

  - ### clear

    public void clear()
    Specified by:
      `clear` in interface `Map<K,V>`

  - ### keySet

    public Set<K> keySet()
    Specified by:
      `keySet` in interface `Map<K,V>`

  - ### values

    public Collection<V> values()
    Unsupported operation
    Specified by:
      `values` in interface `Map<K,V>`

  - ### entrySet

    public Set<Map.Entry<K,V>> entrySet()
    Unsupported operation
    Specified by:
      `entrySet` in interface `Map<K,V>`