com.google.protobuf

## Class MapFieldLite<K,V>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<K,V>
    - - java.util.LinkedHashMap<K,V>
      - - com.google.protobuf.MapFieldLite<K,V>

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>

      public final class MapFieldLite<K,V>
      extends java.util.LinkedHashMap<K,V>

  Internal representation of map fields in generated lite-runtime messages. This class is a protobuf implementation detail. Users shouldn't use this class directly.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `static <K,V> MapFieldLite<K,V>` | `emptyMapField()` Returns an singleton immutable empty MapFieldLite instance.
    `java.util.Set<java.util.Map.Entry<K,V>>` | `entrySet()`
    `boolean` | `equals(java.lang.Object object)` Checks whether two map fields are equal.
    `int` | `hashCode()`
    `boolean` | `isMutable()` Returns whether this field can be modified.
    `void` | `makeImmutable()` Makes this field immutable.
    `void` | `mergeFrom(MapFieldLite<K,V> other)`
    `MapFieldLite<K,V>` | `mutableCopy()` Returns a deep copy of this map field.
    `V` | `put(K key, V value)`
    `V` | `put(java.util.Map.Entry<K,V> entry)`
    `void` | `putAll(java.util.Map<? extends K,? extends V> m)`
    `V` | `remove(java.lang.Object key)`

    - ### Methods inherited from class java.util.LinkedHashMap

      `containsValue, get, removeEldestEntry`

    - ### Methods inherited from class java.util.HashMap

      `clone, containsKey, isEmpty, keySet, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `containsKey, isEmpty, keySet, size, values`

- - ### Method Detail

    - #### emptyMapField

          public static <K,V> MapFieldLite<K,V> emptyMapField()

      Returns an singleton immutable empty MapFieldLite instance.

    - #### mergeFrom

          public void mergeFrom(MapFieldLite<K,V> other)

    - #### entrySet

          public java.util.Set<java.util.Map.Entry<K,V>> entrySet()

      Specified by:
        `entrySet` in interface `java.util.Map<K,V>`
      Overrides:
        `entrySet` in class `java.util.HashMap<K,V>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `java.util.Map<K,V>`
      Overrides:
        `clear` in class `java.util.LinkedHashMap<K,V>`

    - #### put

          public V put(K key,
              V value)

      Specified by:
        `put` in interface `java.util.Map<K,V>`
      Overrides:
        `put` in class `java.util.HashMap<K,V>`

    - #### put

          public V put(java.util.Map.Entry<K,V> entry)

    - #### putAll

          public void putAll(java.util.Map<? extends K,? extends V> m)

      Specified by:
        `putAll` in interface `java.util.Map<K,V>`
      Overrides:
        `putAll` in class `java.util.HashMap<K,V>`

    - #### remove

          public V remove(java.lang.Object key)

      Specified by:
        `remove` in interface `java.util.Map<K,V>`
      Overrides:
        `remove` in class `java.util.HashMap<K,V>`

    - #### equals

          public boolean equals(java.lang.Object object)

      Checks whether two map fields are equal.
      Specified by:
        `equals` in interface `java.util.Map<K,V>`
      Overrides:
        `equals` in class `java.util.AbstractMap<K,V>`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `java.util.Map<K,V>`
      Overrides:
        `hashCode` in class `java.util.AbstractMap<K,V>`

    - #### mutableCopy

          public MapFieldLite<K,V> mutableCopy()

      Returns a deep copy of this map field.

    - #### makeImmutable

          public void makeImmutable()

      Makes this field immutable. All subsequent modifications will throw an `UnsupportedOperationException`.

    - #### isMutable

          public boolean isMutable()

      Returns whether this field can be modified.