Send feedback
Class MapFieldLite<K,V> (3.19.4)
Stay organized with collections
Save and categorize content based on your preferences.
public final class MapFieldLite<K,V> extends 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.
Type Parameters Name Description K
V
Static Methods
<K,V>emptyMapField()
public static MapFieldLite<K,V> <K,V>emptyMapField()
Returns a singleton immutable empty MapFieldLite instance.
Methods
clear()
Overrides
entrySet()
public Set<Map.Entry<K,V>> entrySet()
Overrides
equals(Object object)
public boolean equals(Object object)
Checks whether two map fields are equal.
Parameter Name Description object
Object
Overrides
hashCode()
Returns Type Description int
Overrides
isMutable()
public boolean isMutable()
Returns whether this field can be modified.
makeImmutable()
public void makeImmutable()
Makes this field immutable. All subsequent modifications will throw an UnsupportedOperationException .
mergeFrom(MapFieldLite<K,V> other)
public void mergeFrom(MapFieldLite<K,V> other)
mutableCopy()
public MapFieldLite<K,V> mutableCopy()
Returns a deep copy of this map field.
put(K key, V value)
public V put(K key, V value)
Parameters Name Description key
K
value
V
Overrides
put(Map.Entry<K,V> entry)
public V put(Map.Entry<K,V> entry)
Parameter Name Description entry
Entry <K ,V >
putAll(Map<? extends K,? extends V> m)
public void putAll(Map<? extends K,? extends V> m)
Parameter Name Description m
Map <? extends K ,? extends V >
Overrides
remove(Object key)
public V remove(Object key)
Parameter Name Description key
Object
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[]]