K - the key typeV - the value typepublic class MapEntryLite<K,V> extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
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()
Gets the key.
|
V |
getValue()
Gets the value.
|
static <K,V> MapEntryLite<K,V> |
newDefaultInstance(com.google.protobuf.WireFormat.FieldType keyType,
K defaultKey,
com.google.protobuf.WireFormat.FieldType valueType,
V defaultValue)
Creates a default MapEntryLite message instance.
|
Map.Entry<K,V> |
parseEntry(com.google.protobuf.ByteString bytes,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Parses an entry off of the input as a
Map.Entry. |
void |
parseInto(MapFieldLite<K,V> map,
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Parses an entry off of the input into the map.
|
void |
serializeTo(com.google.protobuf.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(com.google.protobuf.WireFormat.FieldType keyType, K defaultKey, com.google.protobuf.WireFormat.FieldType valueType, V defaultValue)
K - the key typeV - the value typekeyType - the key typedefaultKey - the default keyvalueType - the value typedefaultValue - the default valuepublic void serializeTo(com.google.protobuf.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.output - the outputfieldNumber - the field numberkey - the keyvalue - the valueIOException - Signals that an I/O exception has occurred.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.fieldNumber - the field numberkey - the keyvalue - the valuepublic Map.Entry<K,V> parseEntry(com.google.protobuf.ByteString bytes, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
Map.Entry. This helper requires an allocation so using
parseInto(com.baidu.bjf.remoting.protobuf.MapFieldLite<K, V>, com.google.protobuf.CodedInputStream, com.google.protobuf.ExtensionRegistryLite) is preferred if possible.bytes - the bytesextensionRegistry - the extension registryIOException - Signals that an I/O exception has occurred.public void parseInto(MapFieldLite<K,V> map, com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
MapEntryLite by parsing
directly into the provided MapFieldLite.map - the mapinput - the inputextensionRegistry - the extension registryIOException - Signals that an I/O exception has occurred.Copyright © 2022 Baidu, Inc.. All rights reserved.