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>
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 extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static <K,V> MapFieldLite<K, V> Returns a singleton immutable empty MapFieldLite instance.entrySet()booleanChecks whether two map fields are equal.inthashCode()booleanReturns whether this field can be modified.voidMakes this field immutable.voidmergeFrom(MapFieldLite<K, V> other) Returns a deep copy of this map field.voidMethods inherited from class java.util.LinkedHashMap
containsValue, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, replace, replace, size
-
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.
-