public class MapEntryLite<K,V> extends Object
Modifier and Type | Method and Description |
---|---|
int |
computeMessageSize(int fieldNumber,
K key,
V value)
Computes the message size for the provided key and value as though they were wrapped
by a
MapEntryLite . |
K |
getKey() |
V |
getValue() |
static <K,V> MapEntryLite<K,V> |
newDefaultInstance(WireFormat.FieldType keyType,
K defaultKey,
WireFormat.FieldType valueType,
V defaultValue)
Creates a default MapEntryLite message instance.
|
Map.Entry<K,V> |
parseEntry(ByteString bytes,
ExtensionRegistryLite extensionRegistry)
Parses an entry off of the input as a
Map.Entry . |
void |
parseInto(MapFieldLite<K,V> map,
CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Parses an entry off of the input into the map.
|
void |
serializeTo(CodedOutputStream output,
int fieldNumber,
K key,
V value)
Serializes the provided key and value as though they were wrapped by a
MapEntryLite
to the output stream. |
public K getKey()
public V getValue()
public static <K,V> MapEntryLite<K,V> newDefaultInstance(WireFormat.FieldType keyType, K defaultKey, WireFormat.FieldType valueType, V defaultValue)
public void serializeTo(CodedOutputStream output, int fieldNumber, K key, V value) throws IOException
MapEntryLite
to the output stream. This helper method avoids allocation of a MapEntryLite
built with a key and value and is called from generated code directly.IOException
public int computeMessageSize(int fieldNumber, K key, V value)
MapEntryLite
. This helper method avoids allocation of a MapEntryLite
built with a key and value and is called from generated code directly.public Map.Entry<K,V> parseEntry(ByteString bytes, ExtensionRegistryLite extensionRegistry) throws IOException
Map.Entry
. This helper requires an allocation
so using parseInto(com.google.protobuf.MapFieldLite<K, V>, com.google.protobuf.CodedInputStream, com.google.protobuf.ExtensionRegistryLite)
is preferred if possible.IOException
public void parseInto(MapFieldLite<K,V> map, CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
MapEntryLite
by parsing directly into the provided MapFieldLite
.IOException
Copyright © 2008–2016 Google. All rights reserved.