Class MicroMap<K,​V>

  • Type Parameters:
    K - Key type
    V - Value type
    All Implemented Interfaces:
    Serializable, Map<K,​V>

    @Deprecated(forRemoval=true,
                since="9.0.0")
    public final class MicroMap<K,​V>
    extends Object
    implements Map<K,​V>, Serializable
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use Map.of(Object, Object) instead
    An implementation of the java.util.Map interface which can only hold a single object. This is particularly useful to control memory usage in Wicket because many containers hold only a single component.
    Author:
    Jonathan Locke
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_ENTRIES
      Deprecated, for removal: This API element is subject to removal in a future version.
      The maximum number of entries this map supports.
    • Constructor Summary

      Constructors 
      Constructor Description
      MicroMap()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor
      MicroMap​(K key, V value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs map with a single key and value pair.
    • Field Detail

      • MAX_ENTRIES

        public static final int MAX_ENTRIES
        Deprecated, for removal: This API element is subject to removal in a future version.
        The maximum number of entries this map supports.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MicroMap

        public MicroMap()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Constructor
      • MicroMap

        public MicroMap​(K key,
                        V value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Constructs map with a single key and value pair.
        Parameters:
        key - The key
        value - The value
    • Method Detail

      • isFull

        public boolean isFull()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns:
        True if this MicroMap is full
      • size

        public int size()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        size in interface Map<K,​V>
        See Also:
        Map.size()
      • isEmpty

        public boolean isEmpty()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        isEmpty in interface Map<K,​V>
        See Also:
        Map.isEmpty()
      • get

        public V get​(Object key)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        get in interface Map<K,​V>
        See Also:
        Map.get(java.lang.Object)
      • putAll

        public void putAll​(Map<? extends K,​? extends V> map)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        putAll in interface Map<K,​V>
        See Also:
        Map.putAll(java.util.Map)
      • clear

        public void clear()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        clear in interface Map<K,​V>
        See Also:
        Map.clear()
      • keySet

        public Set<K> keySet()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        keySet in interface Map<K,​V>
        See Also:
        Map.keySet()
      • values

        public Collection<V> values()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        values in interface Map<K,​V>
        See Also:
        Map.values()
      • entrySet

        public Set<Map.Entry<K,​V>> entrySet()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        entrySet in interface Map<K,​V>
        See Also:
        Map.entrySet()