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>
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.
- See Also:
- Serialized Form
-
-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
static <K,V>
MapFieldLite<K,V>emptyMapField()
Returns a singleton immutable empty MapFieldLite instance.Set<Map.Entry<K,V>>
entrySet()
boolean
equals(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(Map.Entry<K,V> entry)
V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> m)
V
remove(Object key)
-
Methods inherited from class java.util.LinkedHashMap
containsValue, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, 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
-
-
-
-
Method Detail
-
emptyMapField
public static <K,V> MapFieldLite<K,V> emptyMapField()
Returns a singleton immutable empty MapFieldLite instance.
-
mergeFrom
public void mergeFrom(MapFieldLite<K,V> other)
-
clear
public void clear()
-
equals
public boolean equals(Object object)
Checks whether two map fields are equal.
-
hashCode
public int hashCode()
-
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 anUnsupportedOperationException
.
-
isMutable
public boolean isMutable()
Returns whether this field can be modified.
-
-