Package 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:
Serializable
,Cloneable
,Map<K,
,V> SequencedMap<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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
static <K,
V> MapFieldLite <K, V> Returns a singleton immutable empty MapFieldLite instance.entrySet()
boolean
Checks whether two map fields are equal.int
hashCode()
boolean
Returns whether this field can be modified.void
Makes this field immutable.void
mergeFrom
(MapFieldLite<K, V> other) Returns a deep copy of this map field.void
Methods inherited from class java.util.LinkedHashMap
containsValue, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, putIfAbsent, remove, replace, replace, size
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
compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, replace, replace, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Method Details
-
emptyMapField
Returns a singleton immutable empty MapFieldLite instance. -
mergeFrom
-
entrySet
-
clear
public void clear() -
put
-
put
-
putAll
-
remove
-
equals
Checks whether two map fields are equal. -
hashCode
public int hashCode() -
mutableCopy
Returns a deep copy of this map field. -
makeImmutable
public void makeImmutable()Makes this field immutable. All subsequent modifications will throw anUnsupportedOperationException
. -
isMutable
public boolean isMutable()Returns whether this field can be modified.
-